As I'm retrieving rows, or even at the end of the retrieve, I want to change the row color based on the value of a certain field. I put the following code in the RetrieveRow event of my datawindow:
string mod_string
mod_string = "DataWindow.Detail.Color = 'String(rgb(255,255,255))~tif(field_name>0,rgb(255,255,0),rgb(255,255,255))'"
dw.Modify(mod_string)
return 0
The above code does not work. The rows are not changing color. If the field is > 0, then I want the row to be yellow else white.
What is wrong with the above code and is this the proper event to put it in?
Also, I want another condition as part of the if statement:
If field>0 and Not isnull(field) then.....
I also tried the above code with this additional condition and it did not work.
Thanks,
Keith
string mod_string
mod_string = "DataWindow.Detail.Color = 'String(rgb(255,255,255))~tif(field_name>0,rgb(255,255,0),rgb(255,255,255))'"
dw.Modify(mod_string)
return 0
The above code does not work. The rows are not changing color. If the field is > 0, then I want the row to be yellow else white.
What is wrong with the above code and is this the proper event to put it in?
Also, I want another condition as part of the if statement:
If field>0 and Not isnull(field) then.....
I also tried the above code with this additional condition and it did not work.
Thanks,
Keith