Home Forums WPF controls Xceed DataGrid for WPF InsertionRow gives hard crash

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

    My setup:
    Windows XP SP2
    Visual C# 2008
    MySQL w/Connector .Net
    XCeed DataGrid for WPF 1.3

    I’m doing the usual routine of connecting a DataSet to a database, slurping in data, handing a DataView to the DataGrid, and putting in an InsertionRow for the user to enter more data.

    As soon as I type something in the InsertionRow and try to move away from the row (presumably triggering an attempt to save the row to the DataSet?), I get a hard crash:

    “The runtime has encountered a fatal error. The address of the error was at 0x56d7b7a7, on thread 0xae4. The error code is 0x80131623. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.”

    I’m guessing there’s some condition that needs to be set before inserting can work, that I haven’t set, and a DataGrid bug lets it slip through into a hard crash; so I’m reporting the latter in case it isn’t already known and asking if anyone has any guesses about the former, in terms of what to look for? I’m using a simple three-column table with nulls permitted in all fields and no constraints set, so I would have thought it should work out of the box.

    Imported from legacy forums. Posted by Russell (had 3428 views)

    Xceed Support
    Member
    Post count: 5658

    We have not encountered this error before. If it is possible, would you send a small repro application over to <a href=”mailto:support@xceedsoft.com”>support</a> to the attention of Marcus referencing this thread.

    Thank you

    Imported from legacy forums. Posted by Marcus [Xceed] (had 240 views)

    User (Old forums)
    Member
    Post count: 23064

    Done.

    Imported from legacy forums. Posted by Russell (had 270 views)

    Xceed Support
    Member
    Post count: 5658

    After investigating, the problem does not seem related to the DataGrid. Here, the DataGrid was binded directly to the DefaultView (and it’s the BindingListCollectionView that handles this).

    There seem to be a problem with the BindingListCollectionView. We can actually reproduce the issue without using the DataGrid.

    e.g.,
    BindingListCollectionView blcv = new BindingListCollectionView( view );
    IBindingList blist = blcv.SourceCollection as IBindingList;

    IEditableObject editableObject = blist.AddNew() as IEditableObject;
    editableObject.EndEdit();

    For the moment, the best workaround would be to bind a DataGridControl to a DataGridCollectionView wrapping his DataView.

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

    User (Old forums)
    Member
    Post count: 23064

    Yes, you’re right. That works, thanks!

    Imported from legacy forums. Posted by Russell (had 4610 views)

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