18

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

ProgramFOX
  • 6,131
  • 11
  • 45
  • 51
maff2002
  • 181
  • 1
  • 1
  • 3
  • 2
    I am not sure if I understand ? Can you explain bit more. `dataSource.read()` should do the job. – Vojtiik Aug 27 '13 at 09:51

1 Answers1

37

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();
user2864740
  • 60,010
  • 15
  • 145
  • 220
Vaibhav
  • 579
  • 4
  • 18
  • 2
    Thanks, but this gives "TypeError: $(...).data(...) is undefined" error. I also looked on many pages and tried different variations of this solution but still get the same error. Any idea? – Jack Dec 05 '15 at 15:34