The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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 03:00 PM UTC
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.