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

Client side binding and caching

4 Answers 172 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 18 Feb 2011, 06:33 PM
Hi,

I know it is possible to setup client side caching declaratively with the RadGrid using the ClientSettings.DataBinding.EnableCaching setting.
However, is it possible to do this with programmatic client side binding?
I am using set_dataSource() and dataBind() methods in Javascript to do the client side binding and I would like to also use caching to implement sorting purely on the client side without any server side callbacks.
Is this possible?

Many thanks,
      Charles Gamble.

4 Answers, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 1
answered on 21 Feb 2011, 10:39 PM
Hi,

Does anyone have info on this?

Many thanks,
      Charles.
0
Veli
Telerik team
answered on 23 Feb 2011, 12:18 PM
Hi Charles,

This is possible, you need to cache the data returned from your web service before binding the grid. Then, use RadGrid's client-side OnCommand event to listen for sort commands. You can then retrieve the sorted field and sort order from the command arguments, sort your data using javascript and pass RadGrid the updated data source using RadGrid.get_masterTableView().set_dataSource(). Finally, call the master table .dataBind() method to bind the grid. You should have sorting working OK.

Veli
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Charles
Top achievements
Rank 1
answered on 23 Feb 2011, 01:35 PM
Thanks for the reply.
It would be really nice if the Grid control provided this functionality itself instead of having it to do it by hand :)
Is there anything in the pipeline for this?

Charles.
0
Veli
Telerik team
answered on 24 Feb 2011, 02:28 PM
Data operations like sorting, filtering and data editing are not implemented on the client-side. With client-side databinding, these operations are performed either in your web service after a request, or the client-side implementation is left to the user to implement. We do not have any specific plans to provide client-side data editing with RadGrid.

Veli
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Charles
Top achievements
Rank 1
Answers by
Charles
Top achievements
Rank 1
Veli
Telerik team
Share this question
or