Adding numbers to grid items

"Luka ;\)" <[email protected]>
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <000501c35799$7c593620$bda24a50@lukascomputer>
Hello all!

What I want to do now is to add numbering to grid items in master-detail relationship.

I thought about using a counter variable which should be initialized (and reset to zero) whenever the master record changes. I guess the best way is to watch events for its TDBNavigator or even DataSource or DataSet. Any hints?

Another thing: when and how to display counter's value? I added a persistent column to my grid and I tried using OnDrawColumnCell but this event fires too often (e.g. when scrolling, editing fields etc.) Is there any flag or property I should watch for?

Or maybe I should add a calculated field to my dataset? Still, same problem: how to (in this case) initialize and manage the value of the field?

TIA!
Best regards,
Mr. Luka Ranisavljevic
<mailto:[email protected]>
Serbia and Montenegro
freelance programmer



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/i7folB/TM
---------------------------------------------------------------------~->

CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.