Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to reorder columns dynamically in gridview?
Posted
Comments
Herman<T>.Instance 4-Aug-11 4:13am    
what do you mean by reorder? (left to Right or sort on a column?)

I know this doesn't answer your question, but as it could make you save a lot of time who knows, maybe you'll consider it:

ASPxGridView Demos[^]

Hope it helps
 
Share this answer
 
Statically, you can set the AllowsColumnReorder property to "True" on the GridView object during design time. It allows the user to reorder the columns within the Grid. For dynamic methodology, we can play around AllowsColumnReorder property programmatically.

For more customization, you can override the methods like:
void DataGrid_ColumnReordering(object sender, DataGridColumnReorderingEventArgs e)
void DataGrid_ColumnReordered(object sender, DataGridColumnEventArgs e)
 
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