Listview column reordering

TWild

Newcomer
Joined
Feb 26, 2003
Messages
3
Hi everyone!
Can anyone tell me how to get the column order after a user reorders the columns on the listview? I couldn't remove then add the columns, because my subitems will all be off. Thanks for any help!
 
Thanks for the reply! But, sorting is not a problem. I have the 'allowcolumnreorder' property set to true for my listview. After a user reorders the columns, I want to be able to save the order so when they come back, the columns are in the order they put them in. There has to be something somewhere that has that order stored in it. Keep in mind the columns are not changing place in the column collection. They keep their same index number.

Sorry I wasn't clear enough :)
 
There is no method in the .NET listview control to get or set the column order once you have set AllowColumnReorder to true and the user has modified them.

However, in the following article someone has gone to the trouble of writing a class that uses the API to get the column order to serialize the listview. You should be able to extract the relevant information from that.

http://www.c-sharpcorner.com/Code/2002/Dec/ListViewSerialization.asp
 
Back
Top