Link to home
Start Free TrialLog in
Avatar of oneeye
oneeye

asked on

DBgrid coloring on var calculated onformshow

I want to color the cells of my dbgrid depending upon a variable which is calculated in a procedure invoked 'on formshow.' Currently, the 'ondrawcolumncell' event appears to happen before 'onformshow.' I'm looking for a suggestion how to paint the cells based on this calculated variable.

The data doesn't exist when the form is initially created.

I am looking for a suggestion to get the grid colored properly.
ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oneeye
oneeye

ASKER

Ah, thank you. Both your answers were very helpful. I do have one additional question, if you could be so kind. Am I correct in assuming that the column drawing method does not page through the records in the table on the draw? What I ended up doing was using as the first column in the dbgrid the variable I calculated as a column 1 pixel wide to set the color of the rest of the columns on that row. This works fine, I was pondering about other more elegant ways of doing this, though.
Avatar of oneeye

ASKER

Wow,

Sorry I forgot to close out the question.