Solved

Inserting a Column in a DataGrid

Posted on 2004-04-01
3
172 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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