Board index » cppbuilder » Int Display in Grid

Int Display in Grid


2006-01-10 06:14:51 AM
cppbuilder73
I'd like to add LongInt as a FieldType to DBGrid. I calculate CRCs and want
them displayed as unsigned.
Can someone give me the eagle's eyeview of how to do that?
Regards,
Rob
 
 

Re:Int Display in Grid

"Robby Tanner" < XXXX@XXXXX.COM >wrote in message
Quote
I'd like to add LongInt as a FieldType to DBGrid. I calculate
CRCs and want them displayed as unsigned.
TDBGrid has an OnDrawDataCell event that you can use for that. When the
Field parameter represents your CRC column, you can draw the value onto the
Grid's Canvas any way you wish. For the rest of the values, call the Grid's
DefaultDrawDataCell() method.
Gambit
 

Re:Int Display in Grid

Hadn't thought of that route. I saw it as a deficiency in the DBGrid and
was going to subclass a new one.
Your method is probably faster and good enough for what I'm doing.
Thanks,
Rob
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Robby Tanner" < XXXX@XXXXX.COM >wrote in message
news:43c2dfcd$ XXXX@XXXXX.COM ...

>I'd like to add LongInt as a FieldType to DBGrid. I calculate
>CRCs and want them displayed as unsigned.

TDBGrid has an OnDrawDataCell event that you can use for that. When the
Field parameter represents your CRC column, you can draw the value onto
the
Grid's Canvas any way you wish. For the rest of the values, call the
Grid's
DefaultDrawDataCell() method.


Gambit


 

{smallsort}