This is a migrated thread and some comments may be shown as answers.

Change Row Background Color Once a Row is Created

1 Answer 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 23 Jun 2011, 09:44 PM
How can I change the background color of a new row that has just been added. I am currently using RowFormatting for other conditions. Basically, I want to show the user when a value in a cell in a row has changed, or when they add a row. Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 23 Jun 2011, 10:31 PM
I hate it when you ask a question and before the answer comes you find it! I was not using the ValueResetFlags.Local and I was also not using e.RowElement.RowInfo... in my condition. I was using grid.CurrentRow...

If condition Then
            e.RowElement.DrawFill = True
            e.RowElement.BackColor = BLL.FarmSupplyBLL.DirtyRowBackgroundColor
Else
            e.RowElement.ResetValue(Telerik.WinControls.UI.LightVisualElement.BackColorProperty,                       Telerik.WinControls.ValueResetFlags.Local)
            e.RowElement.ResetValue(Telerik.WinControls.UI.LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local)
End If
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Share this question
or