ListView Control

Hi Experts,

I have a listview control on a WinForm with ten columns. I added one more column moved it to the correct position in the columns list and set the display indexes of all columns to put it in the correct place but it still displays as the last column instead of the required fourth.

In the Design View it displays in the correct position but when the Form is run it displays as the last column.
DColinAsked:
Who is Participating?
 
CodeCruiserCommented:
I just tried it myself and if I change the DisplayIndex of columns in design mode then it works for me in both design view and at runtime.
0
 
rajvjaCommented:
try to close the application and reopen.
0
 
DColinAuthor Commented:
Hi rajvja,

It is the same.

When I test the contents of the columns at run time they are as the display index with my new column at index 3 but it displays as the end column.
0
 
CodeCruiserCommented:
Do you have any code anywhere else which sets the indices?
0
 
DColinAuthor Commented:
Hi CodeCruiser,

I do not set the indices anywhere in my code. The columns were defined in the control's properties window at design time.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.