Reorder ListView Columns

S

Scott Kay

Hi,

When I use the AllowColumnReorder in the ListView Control, this allows the
user to reorder
columns by dragging them around. Any items added to the control after the
user has reordered them
appear in the correct column (this is good). Is there any way to determine
what the original ordinal
position of the column was before it was reordered?

I tried looking at the Index property of the ColumnHeader but it returns the
order in which the columns appear
not the original column number.

To rehash:

The user is presented with at listview in detail style:
Name - Address - Phone Number
(1) (2) (3)

He then, since AllowColumnReorder is on drags Address to the right of Phone
Number and sees rows now ordered as
Name - Phone Number - Address
(1) (3) (2)

Columns added after this are displayed correctly even though the subitems
are arranged in the orignal order.
Is there any way to determine the original column number?
Is there any way to determine how the columns are remapped?

Thanks,
Scott Kay
 
C

Ciaran

The columns stay at their original ordering in the Columns collection. Its
new order you need to find.

Ciaran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top