Solved

Inserting a Column in a DataGrid

Posted on 2004-04-01
3
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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