The problem is not how to construct a CASE statement, but how to dynamically reference the current column object through dynamicforecolor. If you look at the statement below, you can see a reference to this.nrecno which is a property of my grid class. The "this" object reference issued from the column dynamicforecolor actually refers to the grid object, not the column object!
m.toColumn.DynamicForeColor = "IIF(RECNO()==this.nrecno,"+;
"RGB(255,255,255),RGB(0,0,0))"
What i need is a construct like this:
m.toColumn.DynamicForeColor = "IIF(RECNO()==this.nrecno,"+;
"RGB(255,255,255),IIF(thiscolumn.Fontunderline,RGB(0,0,255),RGB(0,0,0)))"
Where thiscolumn is a dynamic reference to each individual column of the grid. How can I do this?
Vidar Johannessen