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

caching sample..

4 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TMLP
Top achievements
Rank 1
TMLP asked on 15 Dec 2009, 07:22 PM
Hi,

I am trying to get client-side caching so that my grid doesn't have to contact the server when paging number is clicked..
On the example, what is the Location property? Do I have to have a webservice to be able to use client-side caching?
<ClientSettings> 
    <DataBinding Location="~/Grid/Examples/Client/DeclarativeDataBinding/WebService.asmx" 
        SelectMethod="GetDataAndCount" EnableCaching="true" /> 
</ClientSettings> 
 

Thanks..

4 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 15 Dec 2009, 09:14 PM
I think this example in the documentation should better fit your needs :)
0
Fred
Top achievements
Rank 1
answered on 24 Mar 2010, 03:51 PM
I have the same question and that link didn't help at all. Not even related.  Did you ever find a solution?  I bind my grid on the NeedDataSource event.  Every time a user pages, it hits the database again.  Anyway to cache this at the client? 
0
Schlurk
Top achievements
Rank 2
answered on 24 Mar 2010, 05:12 PM
Seems like that was a bad copy and paste on my part, what I mean to copy was the following:

http://www.telerik.com/help/aspnet-ajax/client-side-binding.html

Which also talks about client-side caching. Basically in order to get this kind of functionality you will have to do client-side binding of your RadGrid - which can either be done via the WebService or page methods. The location property refers to where you have your WebService defined.

Since the RadGrid does not load the entire DataSet at once you will have to go back to the DataSource in order to retrieve the next or previous pages, which is why the NeedDataSource is being fired. If you go the WebService route and enable caching this should not happen on pages of the RadGrid which you have previously paged to.

0
Fred
Top achievements
Rank 1
answered on 24 Mar 2010, 07:45 PM
Thanks, much better :)
Tags
Grid
Asked by
TMLP
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Fred
Top achievements
Rank 1
Share this question
or