Home Forums WinForms controls Xceed Grid for WinForms Sorting causing grid to Clear

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

    I am hooking into the EndingEdit event of the InsertionRow to validate the contents of the row before allowing data to be added to the grid.

    A “feature” of the grid is that if you have information in the InsertionRow and then click on a the HeaderRow (causing a sort operation), the InsertionRow will attempt to insert it’s content into the grid. This is causing two operations to occur simultaneously.

    If I cancel the insert in the EndingEdit event, AND the user caused the event by invoking a sort, the grid is cleared of *all* data; headers, footers, groups… everything.

    Is there a way to prevent this from happening?

    Mark

    Imported from legacy forums. Posted by MBonafe (had 2280 views)

    User (Old forums)
    Member
    Post count: 23064

    Fixed it! Here’s how:

    In the InsertionRow.BeginEdit event, I set the ColumnManager.AllowSorting = false. In the EndEdit event, I set AllowSorting back to true.

    I still don’t think I should have to do this, though.

    Imported from legacy forums. Posted by MBonafe (had 3291 views)

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