> 1: Can we disable entry in two out of every three rows?

we had a situation where a grid displayed prices for products - 
but sometimes the price could be edited and sometimes not
depending on some complicated (irrelevant) tests.   

You can do this if you monitor movement within the grid.

The DataChange event will notify you when the focus shifts 
to a new row.    Your handler can fiddle with the readonly
property for each column to set these the way you want them
for the current row.

> 2: Less importantly can we change the colour of the two detail rows?

DBGrid.DrawDataCell will let you draw the cells yourself - 
you can do whatever you want.  In the app i mentioned above
we used different font colours.


[the app i'm referring to has been through several versions
of Delphi - so it may be that there are more "modern" ways
to do this.   Also I'm not 100% sure "DrawDataCell" is still the
event for "ownerdraw" cell drawing.   ISTR this changed
in one of the Delphi versions]

-ns

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to