Solved

Inserting a Column in a DataGrid

Posted on 2004-04-01
3
168 Views
Last Modified: 2010-04-05
I want to insert a numeric column in a Data Grid, amung the table's defined fields.

The column's user input values will be used for calculations.

My attempts have achived the insertion of a column, by adding a NEW FIELD to the ADOQuery control, giving it a TYPE of 'integer' and selecting 'Calculated' for FIELD TYPE.

But the application wont allow for the manual input of values into its cells, which is what I want.

How do I do this?
0
Comment
Question by:ziche
3 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10734658
Calculated fields are just that, calculated. They do not exist physically.

You will have to physically add a new column to your table

1.) Using the maintenance app of your desired database
2.) by runtime code
3.) SQL

What database are you using?

Shane

0
 

Author Comment

by:ziche
ID: 10738544
Im using an Access db connected to my application using ADO controls.

How exactly do I go about doing the 3 points you have suggested?
0
 
LVL 3

Accepted Solution

by:
ThoseBug earned 25 total points
ID: 10756445
Just in your ADO query....
select
 Field1,
 field 2,
 Int_Field_Created
from your_Table

and add all fields (double click into ADOQuery component) then set Int_FieldCreated readonly to false.....now aasign the adoquery to dataset and a DBGIRD to dataset ...that's all....


TB
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now