Wijmo Grid in Popup, Refresh after itemsSource change

Posted by: andrew.k.yohn on 12 May 2019, 10:42 pm EST

  • Posted 12 May 2019, 10:42 pm EST

    In the following fiddle, there is a grid in a popup. When the data source changes. the grid does not redisplay the updated content, even if calling .refresh(true). Please advise.

    http://jsfiddle.net/yohnan/dfcph6n8/22/

    (instruction, in the popup, press the ‘remove row 2’ button to modify the itemsSource.)

  • Posted 13 May 2019, 7:14 pm EST

    Hi,

    To sync grid with the updates in the source collection we need to call the refresh method on the underlying collectionView.

    grid.collectionView.refresh();
    

    Further, instead of directly modifying the source collection, we would recommend you to use the collectionView’s removeAt() method to remove the dataItem, that way we won’t have to call refresh() method explicitily and grid will be updated automatically. Please refer to the following sample which demonstrates the same:

    http://jsfiddle.net/rLb8feck/

    ~sharad

Need extra support?

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

Learn More

Forum Channels