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

grid refresh not working

4 Answers 1168 Views
Grid
This is a migrated thread and some comments may be shown as answers.
M
Top achievements
Rank 1
M asked on 15 Nov 2012, 01:30 PM
I have a grid bound to a remote data source which displays a summary of data. I also have a detail grid which is used for adding additional data.

As new detail rows are added, the summary becomes out of sync with the detail, as it is based on a different data source. I'm happy with this, but I'm trying to add a button that will refresh the master/summary grid.

It should be pretty simple. I'm using HTML:
<button  id="refresh">Refresh Totals</button>
And javascript (abbreviated):
var grid = $("#grid").kendoGrid({... });
 
$('#refresh').click(function(){
    grid.refresh();
});
Clicking the refresh button just gives me:
Uncaught TypeError: Object [object Object] has no method 'refresh'
in Chrome's console

Where am I going wrong?

Thanks

4 Answers, 1 is accepted

Sort by
0
Accepted
Just
Top achievements
Rank 1
answered on 15 Nov 2012, 02:51 PM
Try doing a data source read

grid.data("kendoGrid").dataSource.read();
0
M
Top achievements
Rank 1
answered on 15 Nov 2012, 02:55 PM
Hi

Thanks, that works.

The documentation for Kendo is pretty damn useless at times and downright incorrect at others.

Cheers
0
Just
Top achievements
Rank 1
answered on 15 Nov 2012, 04:26 PM
I understand your agony and have been through it. But, in my opinion, for an open-source free product they are really good. :)
0
M
Top achievements
Rank 1
answered on 15 Nov 2012, 07:10 PM
You're right, of course... we wouldn't be using it otherwise.

Hopefully the product will continue to gather momentum and therefore increase the level of support available from the community.

Thanks again.
Tags
Grid
Asked by
M
Top achievements
Rank 1
Answers by
Just
Top achievements
Rank 1
M
Top achievements
Rank 1
Share this question
or