The backcolor of the grid is the overall grid backcolor, not for the current row only, there is no such row property besides the highlighting of selected rows.
The grid also is not having a cell object per row and column. Even the backcolor of a grid.column.text1 textbox would determine the backcolor of a whole column.
Why? Take a look at the grid object model. You have the grid, if you define a columncount it get's column1, column2, etc. sub objects. The column objects each have a header object and a text1 textbox control. One textbox for all the rows. So the grid only has objects for a single row and to display N rows, these controls are painted many times while scanning through the data.
To have different controls and looks per row the columns have dynamicXYZ properties, dynamiccurrentcontrol, dynamicbackcolor, to name just two.
While a grid paints a row these dynamic properties are evaluated.
What you need therefore is grid.SetAll("dynamicbackcolor","=IIF(status='For Disposal',Rgb(159,255,230),Rgb(255,255,255))","column")
That will be evaluated for each row and since you surely want the whole row colored and not just one column, you need to set the dynamicbackcolor of all columns to get the row colored. Sounds insane, but it works.
In the long run you might want different colors for different states, then just set the second parameter of that SetAll call to "=this.rowcolor()" and define a grid method rowcolor, which has to return a color RGB(r,g,b) value. The method will be called for each displayed row so you don't have to locate a row, you simply can access the current records fields, like status. So you'd have code like this in that method:
Code:
Local lnRowColor
Do Case
Case status = 'For Disposal'
lnRowColor = RGB(159,255,230)
Case status = 'another status'
lnRowColor = RGB(192,192,192)
Otherwise
lnRowColor = RGB(255,255,255)
Endcase
Return lnRowColor
Bye, Olaf.