Re: Format display in DBGrid cell? (D2007 and Vista)
- From: Bob Swart <Bob@xxxxxxxxxx>
- Date: Sat, 19 Apr 2008 17:59:34 +0200
Hi Sven,
I had a similar situation with another program connecting to an Access database. In that program I already used TADODataset (instead of TADOQuery) and was told how to control the DBGrid display using the fielddef properties in TADODataset.
That's the usual way, with the DisplayFormat property of the field (using the fields editor at design-time, of the Fields collection at runtime, casting it to the right field type:
(field as TFloatField).DisplayFormat := '0.00';
for example.
regards Sven
Groetjes,
Bob Swart
--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux)
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
.
- Follow-Ups:
- Re: Format display in DBGrid cell? (D2007 and Vista)
- From: Sven Pran
- Re: Format display in DBGrid cell? (D2007 and Vista)
- References:
- Format display in DBGrid cell? (D2007 and Vista)
- From: Sven Pran
- Format display in DBGrid cell? (D2007 and Vista)
- Prev by Date: Format display in DBGrid cell? (D2007 and Vista)
- Next by Date: Re: Format display in DBGrid cell? (D2007 and Vista)
- Previous by thread: Format display in DBGrid cell? (D2007 and Vista)
- Next by thread: Re: Format display in DBGrid cell? (D2007 and Vista)
- Index(es):