Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how i do soeting in order of alphabates in any data of gridview??
Posted

1 solution

To sort the data in the gridview, follow the instructions in this link:

http://www.dotnetfunda.com/articles/article1598-how-to-sort-the-gridview-data-in-aspnet.aspx[^]

All that GridView does to sort is access the data container underneath and ask it to do the sort. You could cut out the middleman and do the sort yourself before you bind the data if you always want it sorted the correct way. Usually, if I want data sorted a certain way to start, I do so in the call to the database. This is the most efficient place to sort the data. Then my UI can just display the data. Here is more info on how GridView sorts data:

http://msdn.microsoft.com/en-us/library/hwf94875.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900