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

How to Achieve Client Side Sorting without Postback

6 Answers 559 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Srinivas Dhulipala
Top achievements
Rank 1
Srinivas Dhulipala asked on 06 Feb 2012, 03:58 PM
Hi,
Below is my requirement:
I have a RadGrid with 10 columns. I need Client Side Sorting of all the columns without Screen Refresh or Postback.
I have this Radgrid in a USer Control which is being used in many pages.
I tried some of the approaches shown in the various threads in this forum, but all of them resulted in postback.
Can you please send me a working sample of how this can be accomplished.
Thanks 
Srinivas Dhulipala

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Feb 2012, 05:24 AM
Hello Srinivas,

Take a look at the following demo.
Grid / Declarative Binding

-Shinu.
0
Princy
Top achievements
Rank 2
answered on 07 Feb 2012, 05:35 AM
Hello,

Take a look into the following forum thread which discussed the same.
client side paging and sorting of RadGrid

Thanks,
Princy.
0
Dan
Top achievements
Rank 1
answered on 11 Aug 2016, 12:04 AM

It seems to me that the Question is pretty straightforward:
"How to Achieve Client Side Sorting without Postback" but what the user (and myself) is really trying to achieve is re-sorting the array without retrieving the data again. 
Both of the responses here send the user to threads or examples that insist on do declarative binding which is just another way of getting the data again.
It would appear to me that there is no Built in way to do this with Telerik Rad Controls. I suspect this has to do with the fact that the entire Grid is ajaxified and as such requires a postback?

Can we please get an Admin person that really understands this to give us a straightforward answer?


0
Eyup
Telerik team
answered on 15 Aug 2016, 08:11 AM
Hello Dan,

When binding your grid on server-side, it requires postback every time you initiate a rebinding action like Paging, Sorting, Filtering, etc. In order to optimize performance and improve greatly user responsiveness, you can ajaxify the grid. You can do that using RadAjaxManager or RadAjaxPanel:
http://docs.telerik.com/devtools/aspnet-ajax/controls/ajaxmanager/overview
http://docs.telerik.com/devtools/aspnet-ajax/controls/ajax/radajaxpanel/overview

You can check various live samples to see it in practice:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/paging/basic-paging/defaultcs.aspx

Alternatively, you can bind your grid entirely on client-side:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/client-data-source-binding/defaultcs.aspx

To wrap it up, it depends on your chosen binding approach. If the binding is server-side, a full PostBack or ajaxified partial CallBack must be done to the server to get the data anew. If the binding is client-side, you can update the grid using only javascript, without rendering the page all over.

I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Dan
Top achievements
Rank 1
answered on 15 Aug 2016, 04:09 PM
Hi Eyup,
So, succinctly, one cannot re-sort the Grid without Rebinding!
0
Eyup
Telerik team
answered on 18 Aug 2016, 11:44 AM
Hi Dan,

Yes, of course. The grid records should be refreshed in order to update their position, depending on the chosen sort mode (ASC, DESC, None) and field.

Regards,
Eyup
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Srinivas Dhulipala
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Dan
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or