how to sort data when the columns are dynamically generated at runtime .sorting when done to . its possible to sort in one direction but suppose we hav made it ascending how do we make it descending on the next click on header. please give a full working
example .as i have tried many options but somehow it's not working fine. also sorting direction and criteria should be maintained across all pages of the data gridview. take a gridview data of simple 3 columns and therir headers are not harcoded but rather
dynamically created. Please give a working solution. i'm stuck
Sam.Dev
Participant
1390 Points
342 Posts
Re: How to sort data into GridView
Feb 23, 2008 05:38 AM|LINK
While fetching ur data from data base try to add OrderBy Asceding or descending clause with ur select sattement.
hope this helps
sam
--Mark the post as Answer if the Post helps you--
kishalaya
Member
2 Points
1 Post
Re: How to sort data into GridView
Mar 02, 2009 08:18 AM|LINK
how to sort data when the columns are dynamically generated at runtime .sorting when done to . its possible to sort in one direction but suppose we hav made it ascending how do we make it descending on the next click on header. please give a full working example .as i have tried many options but somehow it's not working fine. also sorting direction and criteria should be maintained across all pages of the data gridview. take a gridview data of simple 3 columns and therir headers are not harcoded but rather dynamically created. Please give a working solution. i'm stuck