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

How to do Client Side Sorting

3 Answers 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anantharaman
Top achievements
Rank 1
Anantharaman asked on 03 Feb 2012, 06:41 AM
Hi,
Below is my requirement:
I have a RadGrid with 10 columns. I need Client Side Sorting of all the columns.
I have this Radgrid in a USer Control which is being used in many pages.
Can you please send me a working sample of how this can be accomplished.
Thanks
Anantharaman

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 03 Feb 2012, 06:54 AM
Hello,

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

Thanks,
Princy.
0
Anantharaman
Top achievements
Rank 1
answered on 03 Feb 2012, 03:07 PM
Thanks Princy for the Reply.

I tried the approach suggested by Shinu in the thread, but clicking on the header for sorting refreshes the screen (postback) and the grid disappears.
I want the Sorting to be done on the client side without any postback.
Also my data source for the RadGrid is a regular dataset.
Can you please send me a working sample for the above scenario?
Thanks
Anantharaman
0
Marin
Telerik team
answered on 07 Feb 2012, 10:51 AM
Hi Anantharaman,


With a regular dataset for the datasource it means that the sort command have to be executed on the server because the actual data that is bound to the grid is in a dataset structure on the server. So a postback is required in this case when you use server-side binding to a regular dataset.
Another option is to try to utilize a client-side binding if it is applicable in your scenario. Detailed demo of it (including sorting) can be found here:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx 


Greetings,
Marin
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Anantharaman
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Anantharaman
Top achievements
Rank 1
Marin
Telerik team
Share this question
or