Home Forums WinForms controls Xceed Grid for WinForms disable DataRowsChanged?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15971 |

    Hi,

    Is there a way to disable the DataRowsChanged event until the grid has loaded.

    vb.net.

    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

    Everytime it hits the xg.DataRows.AddNew().EndEdit() the DataRowsChanged event fires, which I want to use, but when the grid is fully loaded and there are values in the cells.

    Thanks in advance.

    Imported from legacy forums. Posted by troy@querytool.com (had 2004 views)

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.