Refresh Grid After Create

2 posts, 0 answers
  1. James
    James avatar
    7 posts
    Member since:
    Dec 2013

    Posted 13 Feb 2017 Link to this post

    I have a grid setup to show a popup editor for creating items.  The problem I am running into is that depending on what the user selects in the popup editor, the code might create more than one item.  The controller method is returning all of the created items but only the first one gets added to the grid.  How do I either a) get the grid to show all of my added items or b) refresh the grid?  I can't just reload the page because there are other items on that page that I don't want to reload.
  2. Stefan
    Stefan avatar
    3067 posts

    Posted 15 Feb 2017 Link to this post

    Hello James,

    In general, this may occur because not all of the new items have an id, the Grid is expecting an id for every newly added item.

    As for the refreshing the Grid, this can be done using the refresh method of the Grid, and this will re-create the Grid with the current data without making a new request to the server:

    As the described scenario is specific, it may require additional modification that we are overlooking at this moment. If additional assistance is needed, please send a runnable example, so I can provide a suggestion best suited for it.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top