Re: Format display in DBGrid cell? (D2007 and Vista)
- From: "Sven Pran" <no.direct@xxxxxxxxxxx>
- Date: Sat, 19 Apr 2008 19:19:46 +0200
Thanks, I will incorporate TADODataset here as well.
(This is the first time I try to ADO an Excel workbook and got the coding from a sample)
regards Sven
"Bob Swart" <Bob@xxxxxxxxxx> wrote in message news:480A16E6.6020102@xxxxxxxxxxxxx
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
.
- References:
- Format display in DBGrid cell? (D2007 and Vista)
- From: Sven Pran
- Re: Format display in DBGrid cell? (D2007 and Vista)
- From: Bob Swart
- Format display in DBGrid cell? (D2007 and Vista)
- Prev by Date: Re: Format display in DBGrid cell? (D2007 and Vista)
- Next by Date: ADO Excel D2007 SQL UPDATE problem
- Previous by thread: Re: Format display in DBGrid cell? (D2007 and Vista)
- Next by thread: ADO Excel D2007 SQL UPDATE problem
- Index(es):