Home Forums WinForms controls Xceed Grid for WinForms DataRows HotTrack…is it possible? Reply To: DataRows HotTrack…is it possible?

User (Old forums)
Member
Post count: 23064

I’m using this code when add new row:

dim newRow as DataRow

newRow = grid.datarows.addnew
newRow.cells(0).value = …
newRow.cells(n).value = …

for I = 0 to newRow.cells.count – 1
addHandler newRow.cells(I).MouseEnter, addressOf rowMouseEnter
addHandler newRow.cells(I).MouseLeave, addressOf rowMouseLeave
Next

Private Sub rowMouseEnter(ByVal sender As Object, ByVal e As System.EventArgs)
sender.parentRow.backcolor = Color.SkyBlue
End Sub

Private Sub rowMouseLeave(ByVal sender As Object, ByVal e As System.EventArgs)
sender.parentRow.backcolor = Color.White
End Sub

This code work fine.. but… i must handle every cell… exist another solution?

Imported from legacy forums. Posted by Fusion (had 2992 views)