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

Clear grid ClientFooterTemplate

2 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 22 Feb 2014, 05:37 PM
Hello,

I currently have a clear grid button and the following code clears the rows from the grid:

$("#studentGrid").data('kendoGrid').dataSource.data([]);

But my problem is, I have a ClientFooterTemplate with totals.  How do I clear the ClientFooterTemplate in a javascript call?  I could do it on the DataBound event, but just don't know how to clear that footer.

Thanks...

2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 26 Feb 2014, 07:33 AM
Hi Michael,

The MVC Wrappers generate a DataSource that uses server operations by default, meaning that the aggregates are calculated on the server, so even if you clear the Grid's data the aggregates will not change until the data is synchronized. In the current scenario I would recommend disabling the server operations. Once you do that the aggregates will be calculated client-side, so if you set the data to an empty array then the total will become zero.

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Michael
Top achievements
Rank 1
answered on 02 Mar 2014, 03:19 PM
Thanks, works great!
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Michael
Top achievements
Rank 1
Share this question
or