Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Listview ColumnHeader Bug or Poorly designed feature

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    211

    Resolved [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.?

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2005] Listview ColumnHeader Bug or Poorly designed feature

    Quote 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
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    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.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    211

    Re: [2005] Listview ColumnHeader Bug or Poorly designed feature

    Quote 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
  •  



Click Here to Expand Forum to Full Width