Hello,
I am using the RowFormatting event to set an image to the GridRowHeaderCellElement. This is working. However when a user hovers the mouse over the header cell, the image gets removed, and it will only get reset if he clicks a row again.
Here is the code I use for RowFormatting:
How can I prevent the header cell image to get reset?
I am using the RowFormatting event to set an image to the GridRowHeaderCellElement. This is working. However when a user hovers the mouse over the header cell, the image gets removed, and it will only get reset if he clicks a row again.
Here is the code I use for RowFormatting:
| void RowFormatting_ImageChanging(object sender, Telerik.WinControls.UI.RowFormattingEventArgs e) |
| { |
| GridRowHeaderCellElement grhce = e.RowElement.Children[0] as GridRowHeaderCellElement; |
| if (grhce != null) |
| { |
| GridViewEditableEntry aa = e.RowElement.RowInfo.DataBoundItem as GridViewEditableEntry; |
| if (aa != null) |
| { |
| if (aa.Changed) |
| grhce.Image = myimage1; |
| else if (aa.IsEditable) |
| grhce.Image = myimage2; |
| else if (!aa.IsEditable) |
| grhce.Image = myimage3; |
| } |
| else |
| { |
| grhce.Image = null; |
| } |
| } |
| } |
How can I prevent the header cell image to get reset?