Sunday, August 3, 2008

Change the back color of a Gridview row when you click the Edit button or link

If you have an editable Gridview and you need to change the backcolor of the row you are editing, just write these tow lines of code in the Gridview's RowEditing Event.
MyGridview.SelectedIndex = e.NewEditIndex;
MyGridviewID.SelectedRow.BackColor = Drawing.Color.Red;

No comments:

Post a Comment