Similar questions may exists, but none of them seems to be helpfull. So I'll try to explain a more specific case, and see if anyone can help me :)
Here is the thing, I have a gridview with templatefields, and I want to let the user to specify the order those columns are shown. So, the user creates a view and decides which column to display first, second, and so on.
So basically, I need to change the order of the columns just after the grid is loaded with data.
Sounds easy huh? Well, apparently it's not. At least I couldn't achieve that just yet.
Some notes: - Of course I have AutogenerateColumns set to false. - Change the sql select columns order won't work because of previous item. - And I'd like not to generate the columns by the code.
Any ideas?
See Question&Answers more detail:os