Home › Forums › WinForms controls › Xceed Grid for WinForms › valuechanged during › Reply To: valuechanged during
This won’t work.
You need to attach the handler to all the cells that are actually in your grid, so loop through each row in your table and then through each cell and add handlers
Change:
Dim row As CellRow = grdTest.CurrentRow
To:
Dim changingCell As Xceed.Grid.DataCell = DirectCast(sender As Xceed.Grid.DataCell)
Dim row As Xceed.Grid.DataRow = Nothing
If Not changingCell Is Nothing Then
row = changingCell.ParentDataRow
End
If Not row Is Nothing Then
‘ Rest of your code goes here.
End If
Instead of adding handlers though inherit from DataCell and DataRow and use them. It’s more memory efficient, plus you have greater control and easier use. There are documents in the Xceed documentation that tell you how to do this.
Imported from legacy forums. Posted by Chris (had 306 views)