Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated fields in a grid 1

Status
Not open for further replies.

Thardan

Programmer
Jul 8, 2003
2
FR
Please! I am a new self made programer, and have problems with displaying calculated fields in a grid. Can you help me. Thanx
 
hi

Could you elaborate a bit more on what you are currently doing and what you want to achieve, for example, are you using a dbgrid or stringgrid etc...

lou

 
For a DBGrid, create the calculated fields in the DataSet (e.g. TTable) and you can use them like data fields, expcept that they will be ReadOnly.

If you cannot do that, you can paint the cell contents yourself using the TDBGrid.DrawColumnCell event.

Cheers
 
One alternative would be to make use of a TQuery component and have the calculated fields worked out for you within the scope of the SQL result set (underlying database permitting).
Steve
 
Or use the OnGetText to calculate the data properly after running the query.

Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top