Delphi Pages Forums

Delphi Pages Forums (http://www.delphipages.com/forum/index.php)
-   DB-Aware (http://www.delphipages.com/forum/forumdisplay.php?f=5)
-   -   a small question related to dbgrid/dataset values (http://www.delphipages.com/forum/showthread.php?t=161959)

sunil 03-29-2006 08:00 AM

a small question related to dbgrid/dataset values
 
Dear all gurus

I need one important help, perhaps the question may look silly to you senior people but I am not able to find a solution, so here I am seeking your valuable help once again.

I have a dataset , datasource, dbgrid and dbchart in one of my application. I need to plot the values from a Float field in dataset with exact precision on dbchart but in dbgrid I need to show the values with two precision points

please guide me with some solution for the above problem

AceOmega 03-29-2006 01:52 PM

RE: a small question related to dbgrid/dataset values
 
Double Click on your TTable or TQuery that your Datasource is tied to, to bring up a list of the fields that are to be displayed. Click the field and in the Object Inspector, setup the Display format.

atulparmar 03-29-2006 10:18 PM

RE: a small question related to dbgrid/dataset values
 
1. In the dataset add one calculated column (which will be displayed in the grid).
2. calculate its value on OnCalcFields event with the precision you want.
3. show this (calculated) field and hide the actual field in dbgrid.
4. show actual field in the chart and hide calculated field.



Accept As Answer if it helps

Atul

atulparmar 03-29-2006 10:28 PM

RE: a small question related to dbgrid/dataset values
 
Sunil, btw where r u from?

Accept As Answer if it helps

Atul


All times are GMT. The time now is 05:10 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.