I need the row which the mouse is currently over to be highlighted, CellMouseHoverEnter & Leave events are working but dataBoundGrid1.Model.RowStyles[e.RowIndex].BackColor = Color.AliceBlue; does not do anything to change the backcolor of the row. Is there another way to do this?
ADAdministrator Syncfusion Team August 7, 2003 10:00 AM
In a GridDataBoundGrid, you cannot set RowStyles as none are saved in this grid.
One way to do this would be to track a currentmouserow variable which you could set in the events you are using now. When you change rows, then call grid.RefreshRange to force the grid to repaint the 2 adjacent rows, the new row and the old row.
In PrepareViewStyleInfo, check e.RowIndex to see if it is the courrentMouseRow, and if it is, then set the e.Style.BackColor to your color.
In this way, you will color the currentmouse row.