R
Ray Martin
I have created a custom datagridcolumn, and would like to color the cell
based on criteria passed as a parm when the column is created. I would like
this to be generic so I want to do something similar to the Clipper/dBase
function "&", or even the DOTNET Debug.Evaluate methid.
So, for example if I wanted the cell in row 5 to be the one to be colored
differently I could do something like:
mynewcolumn = new colorcolumn(brushes.red,"rownum = 5")
and then inside colorcolumn I could have code like
Private colorcolumn(background as brush, filterstring as string)
if eval(filterstring) then
set background to background
endif
mybase.paint(etc, etc)
What I hope to achieve is that eval(filterstring) will execute at run-time
and produce
if rownum=5 then.....
How can I do this or something similar?
based on criteria passed as a parm when the column is created. I would like
this to be generic so I want to do something similar to the Clipper/dBase
function "&", or even the DOTNET Debug.Evaluate methid.
So, for example if I wanted the cell in row 5 to be the one to be colored
differently I could do something like:
mynewcolumn = new colorcolumn(brushes.red,"rownum = 5")
and then inside colorcolumn I could have code like
Private colorcolumn(background as brush, filterstring as string)
if eval(filterstring) then
set background to background
endif
mybase.paint(etc, etc)
What I hope to achieve is that eval(filterstring) will execute at run-time
and produce
if rownum=5 then.....
How can I do this or something similar?