Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2006, 08:00 AM
sunil sunil is offline
Junior Member
 
Join Date: Dec 2005
Posts: 26
Default 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
Reply With Quote
  #2  
Old 03-29-2006, 01:52 PM
AceOmega AceOmega is offline
Senior Member
 
Join Date: Sep 2004
Posts: 2,393
Default 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.
Reply With Quote
  #3  
Old 03-29-2006, 10:18 PM
atulparmar atulparmar is offline
Senior Member
 
Join Date: Aug 2004
Posts: 305
Default 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
Reply With Quote
  #4  
Old 03-29-2006, 10:28 PM
atulparmar atulparmar is offline
Senior Member
 
Join Date: Aug 2004
Posts: 305
Default RE: a small question related to dbgrid/dataset values

Sunil, btw where r u from?

Accept As Answer if it helps

Atul
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:10 PM.


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