|
-
Jun 21st, 2007, 02:08 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [2005] Listview ColumnHeader Bug or Poorly designed feature
I've just ran into this and either I don't understand it or it wasn't designed well. Or Both.
I have a Listview on my form (designer), and I right click on the listview and goto EDIT COLUMNS.
I added 3 columns, and hit OK. Run the app, and all 3 columns look fine. Now i want to add a 4th column between the existing columns 1 and 2. So I see the Sort arrows that move my newest tab up the list, which would intuitively mean that thats the order it shows up when displayed at run time.
But when I run the app, the 4th column is still in the last location, even though it shows up correct in the list in the EDIT COLUMNS editor area. It seems that the "Display Index" property defines what order they show up in. But on the sorting list, that Member number is what I think should be used for the Display Index.
So attempting to renumber them is also impossible, since I can't just change the first number to something like 1000 and then change it back after I change the other ones around, and I can't retype the same number. The validation is done on the field change, when it should be done on the form accept.
So thats 2 related poor designs/bugs that I found with it. Unless someone can explain what the idea behind that design is.?
-
Jun 21st, 2007, 03:45 PM
#2
Re: [2005] Listview ColumnHeader Bug or Poorly designed feature
 Originally Posted by DssTrainer
I've just ran into this and either I don't understand it or it wasn't designed well. Or Both.
I have a Listview on my form (designer), and I right click on the listview and goto EDIT COLUMNS.
I added 3 columns, and hit OK. Run the app, and all 3 columns look fine. Now i want to add a 4th column between the existing columns 1 and 2. So I see the Sort arrows that move my newest tab up the list, which would intuitively mean that thats the order it shows up when displayed at run time.
But when I run the app, the 4th column is still in the last location, even though it shows up correct in the list in the EDIT COLUMNS editor area. It seems that the "Display Index" property defines what order they show up in. But on the sorting list, that Member number is what I think should be used for the Display Index.
So attempting to renumber them is also impossible, since I can't just change the first number to something like 1000 and then change it back after I change the other ones around, and I can't retype the same number. The validation is done on the field change, when it should be done on the form accept.
So thats 2 related poor designs/bugs that I found with it. Unless someone can explain what the idea behind that design is.?
Hi,
I've tryed with 3 columns and then added a new one fourth. I've changed the place with arrows and yes the sorting list it was at place 2 (display index 1).
I've changed the displayindex into 0 for the first, 1 for the new column, etc...
and then it showed good during debugging.
So, I think you can try to change the DisplayIndex for this problem.
Wkr,
sparrow1
-
Jun 21st, 2007, 04:02 PM
#3
Re: [2005] Listview ColumnHeader Bug or Poorly designed feature
its not a bug, since the behavior you are basically asking for was how the listview worked in .NET 1.1
The DisplayIndex is a new property to listviewcolumns in the .NET 2.0 framework.
If it is really an issue for you, you may want to just add the column headers via code, and that way it would make it easy for you to change the order they are added to the listview if needed, instead of changing the displayindex at design time. Although I don't think changing the displayindex is a very daunting task.
-
Jun 22nd, 2007, 07:52 AM
#4
Thread Starter
Addicted Member
Re: [2005] Listview ColumnHeader Bug or Poorly designed feature
 Originally Posted by kleinma
its not a bug, since the behavior you are basically asking for was how the listview worked in .NET 1.1
The DisplayIndex is a new property to listviewcolumns in the .NET 2.0 framework.
If it is really an issue for you, you may want to just add the column headers via code, and that way it would make it easy for you to change the order they are added to the listview if needed, instead of changing the displayindex at design time. Although I don't think changing the displayindex is a very daunting task.
Interesting, I closed and reopened VB2005 and now i CAN change the DisplayIndex as expected. The bug wasn't the way it was designed, it was the fact that it wouldn't let me change the DisplayIndex. Now it is letting me change it so apparently its intermittent. I know that it wouldn't let me change the DisplayIndex if I was actively running a program in debug, but I checked that it was stopped and it still wasn't letting me change it before.
Anyway, now it seems to be working. Tho I still think the sorting arrows should be enough to imply that the DisplayIndex would auto-update to the new position, but I digress.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|