Home Forums WinForms controls Xceed Grid for WinForms disable DataRowsChanged? Reply To: disable DataRowsChanged?

Xceed Support
Member
Post count: 5658

You could simply remove the handler before calling the AddNew() and re-Add it after:

<code>
RemoveHandler xg.DataRowsChanged, AddressOf xg_DataRowsChanged
Dim x, i As Integer
For i = 0 To 50
x = i + 6

xg.DataRows.AddNew().EndEdit()
xg.DataRows(i).Cells(0).Value = i.ToString
xg.DataRows(i).Cells(1).Value = x.ToString

Next
AddHandler xg.DataRowsChanged, AddressOf xg_DataRowsChanged
</code>

Imported from legacy forums. Posted by CharlesB (had 3021 views)