Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo ui datasource refresh?

I have used kendo grids and charts fine and refreshed them with the following example code:

$("#Product").data("kendoGrid").dataSource.read();

However, I have used the datasource just to provide some basic data in a different view, like in this example where it does not use the grid http://demos.kendoui.com/web/datasource/index.html

Is there a way to refresh this datasource in the same kind of way as the above code does for the grids and charts?

Thanks, Matt

like image 542
maff2002 Avatar asked Aug 27 '13 07:08

maff2002


People also ask

How do you rebind Kendo grid?

Bind data to Kendo Grid by using AJAX Read action method. Change the datasource on change event of any HTML controls. Normally, a developer can bind the data to Grid by using AJAX Read method. This read method is ActionResult method in MVC which will return JSON DataSourceResult & direclty bind the data to Grid.


1 Answers

It seems to be that only the data is read with dataSource, you need to refresh the grid also like this:

$("#Product").data("kendoGrid").dataSource.read();
$("#Product").data("kendoGrid").refresh();
like image 53
Vaibhav Avatar answered Nov 17 '22 00:11

Vaibhav