When a certain condition exists I change the back color of a row to red when the row is initialized. If the condition is changed I want to change the back color to the same as the other rows. My rows alternate color. How do I change the color back to normal?
e.Layout.Appearance.Add("My New Appearance")
"add an Appearance to the Appearances collection of the layout" How do I do that? I set all my appearance items in Initialize Layout.
Hi,
That depends how you are setting the row color initially. What I would do is use the InitializeLayout event of the grid to add an Appearance to the Appearances collection of the layout. Assign a BackColor to this appearance.
In InitializeRow, I would examine the row and if it meets the criteria I want, I would assign the row.Appearance to the appearance I created. If not, I would set the row.Appearance to null to clear the appearance and revert to the normal row backcolor.