I have a button called sort in my aspx page. I have a gridview, which has id as "ManualGrid". In the girdview i have columns as "country, state,class".
Country and state and dropdownboxes which are filled from database. When the sort button is clicked, i want to sort the grid based on the combination of these 3 columns. All the 3 columns should get sorted.
If you are using asp.net gridview, I will suggest you not to sort with jQuery. If your grid is a plain HTML table then you can try the following plugin-
If you are using asp.net gridview, you should not use javascript/ jquery to sort. Its not good to mix client side modification with asp.net server control. If you use datatable component, these features are built in.
Thanks & Regards
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
Marked as answer by BU XI - MSFT on May 23, 2012 03:02 AM
venkatzeus
Participant
1633 Points
1022 Posts
jquery Gridview sorting on combination of columns
May 17, 2012 09:43 AM|LINK
Hi,
I have a button called sort in my aspx page. I have a gridview, which has id as "ManualGrid". In the girdview i have columns as "country, state,class".
Country and state and dropdownboxes which are filled from database. When the sort button is clicked, i want to sort the grid based on the combination of these 3 columns. All the 3 columns should get sorted.
How to achieve this using jquery?
Thank you
asteranup
All-Star
30184 Points
4906 Posts
Re: jquery Gridview sorting on combination of columns
May 17, 2012 09:54 AM|LINK
Hi,
If you are using asp.net gridview, I will suggest you not to sort with jQuery. If your grid is a plain HTML table then you can try the following plugin-
http://datatables.net/examples/basic_init/multi_col_sort.html
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
venkatzeus
Participant
1633 Points
1022 Posts
Re: jquery Gridview sorting on combination of columns
May 17, 2012 11:02 AM|LINK
Hi,
I am new to jquery.
I am having the gridview. Is it not possible to sort multiple columns in jquery.
asteranup
All-Star
30184 Points
4906 Posts
Re: jquery Gridview sorting on combination of columns
May 17, 2012 11:14 AM|LINK
Hi,
If you are using asp.net gridview, you should not use javascript/ jquery to sort. Its not good to mix client side modification with asp.net server control. If you use datatable component, these features are built in.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog