This is a migrated thread and some comments may be shown as answers.

Refresh Grid After Create

1 Answer 800 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 13 Feb 2017, 02:44 PM
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.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Feb 2017, 08:12 AM
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:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-refresh

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.

Regards,
Stefan
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 (charts) and form elements.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or