Assertion Failure when updating FlexGrid

Posted by: p.wijmo on 21 May 2018, 4:40 am EST

    • Post Options:
    • Link

    Posted 21 May 2018, 4:40 am EST

    Hi,

    I have an (angular2) FlexGrid with a linked oData collectiojn view.

    I want to edit values in-place in the grid, but attempting to move off an edited row generates an assertion in the console:

    ====

    ** Assertion failed in Wijmo: write operations require keys.

    I’ve tried subscribing to rowEditEndedNg and rowEditEndingNg and setting “Cancel” t true so I can intercept the event and perform the update myself, but to no avail so far - the assertion still logs and I can’t move off the row.

    What strategy do I need to adopt to work around this? Do I need to trap on a cell-by-cell basis?

  • Posted 22 May 2018, 2:03 am EST

    Hi,

    The primary keys should be set for OData keys property to allow CRUD operations.

    Please refer to the documentation:

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.odata.ODataCollectionView.Class.html#keys

    Also refer to the OData/src/components/customers.component.ts file at

    http://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/OData/Angular2/Code

    ~Manish

  • Posted 22 May 2018, 7:13 am EST

    EDIT: Sorry I see your second link answers the “how do I intercept a callback” question - thanks again,

    Thanks Manish - I was convinced I’d added a keys array in the right place, but apparently not. I’m over the assertion error now, but I’d still like to intercept the call to update the data.

    I believe I need to specify a callback on the oData options object but i’m struggling to find examples. Is there any documentation for the options object you can point me at? I come to a dead end when I follow the links from

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.odata.ODataCollectionView.Class.html#

  • Posted 23 May 2018, 4:56 am EST

    Hi,

    Please refer to the following forum post for the same:

    https://www.grapecity.com/en/forums/wijmo/scroll-abnormality-in-virt

    Hope it helps!

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels