I looked at plenty of code and can't really find a clear answer.
What I want to do is have a grid with paging, sorting and filtering. Once I bind my dataset (read only, no CRUD), even if i use pagination and filters, i want all the dataset to be downloaded (may be up to 3000 records) and then everything like filtering, changing page and sorting be done client side without using any callback to AJAX nor Postback.
The reason is that the call to the database has so many calculations that it takes forever to get the dataset to be filled. The user won't wait 30 to 40 sec each time he clicks on one of the features.
Also, I don't want to cache the resultset inside the session or on a temporary file on the server. I want it all in the browser.
This will be use on a private Intranet on IE8.
It is not intended for a wide audience.
Is that possible?
And if so, how do i do it?
Kindest regards,
Michel
5 Answers, 1 is accepted
Thanks
Michel
In order to have the grid perform fully client-side operations you will have to bind it either through a web service / page methods or directly on the client to a JSON serialized data. Both approaches are entirely client-side oriented and do not require any kind of postback or ajax request. Filtering, paging and sorting are also supported in this case.
You can find demo examples of each for each of the options in the links below:
web service: http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx
JSON data (provided through a page method): http://demos.telerik.com/aspnet-ajax/grid/examples/client/databinding/defaultcs.aspx
I hope this helps. Let me know if you have any other questions.
Marin
the Telerik team
The JSON cannot be used for me.
The first example, your sample is incomplete. The webservice ASMX file is missing. (vb.net mode)
Also it uses a list objects that I cannot use, I have a dataset/datatable.
Is it possible it keeps calling the webservice for each action ?
Anyway, all my code on itemcrated and itemdatabound is not working.
Maybe I didn't explain myself properly. I don't think a clientside databind will do the job.
I want to fill teh grid "server side" with my 3000 rows because i have hyperlink parameters to manage.
Then do the paging, sorting and filtering clientside only. Pretty much like Kendo UI Grid does.
Once It has it's data, it never calls back a page or a webservice.
My guess is that it cannot be done with that control.
Regards
When using client-side binding in the grid, paging, sorting and filtering should be performed with a request to a web service or a page method. The grid does not cache the data on the client. But in order to perform sorting, filtering and paging entirely client-side without any request, you need to have this data serialized in JSON format, which is not suitable for large number of records because it will slow down the browser. Once you have the JSON serialized data you can manually manipulate it on the client in the OnCommand event to bind the control to the filtered / sorted / paged set of records without additional requests or postback.
Generally speaking RadGrid does not support pure client-side filtering and sorting like the KendoUI grid, that's why you need to perform these operations on the server.
Marin
the Telerik team
Hi ,
if i bind datagrid in clientside through web service will it preserve value inside Textbox of template column when i apply filter or do pagination and sorting ?
Regards,
Bibek