how to apply sorting(ascending+descending) on the same column of datagrid in asp.net.

Posted by Rajiv_663 under ASP.NET on 2/7/2011 | Points: 10 | Views : 1561 | Status : [Member] | Replies : 2
how to apply sorting(ascending+descending) on the same column of datagrid in asp.net.

suppose a column on the datagrid showDate. if we have to click on it then it will sort the datagrid in ascending order. and if again click on the same column then it will sort the datagrid in descending order.




Responses

Posted by: Prabhakar on: 2/7/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi, Rajiv_663

if u want to shorting in your gird so you Fill Ur GridView Dynamically & set property AllowSorting=true
that is fine code forYour requirement ..

Best Regard's
Prabhakar

Rajiv_663, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/7/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Check this link

http://www.codeproject.com/KB/grid/datagridsort.aspx

Thanks
Karthik
www.f5Debug.net

Rajiv_663, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response