Thread: ListView Sorting

  1. #1

    ListView Sorting

    I am adding items to listview at runtime. Thats OK. But I want to list them as adding sequence. I tried to add them backward via "for" circle but this time an unhandled exception occur. I am adding list items from a dynamic array, then calling "addtolist" procedure then when turning from proc. deleting the array. But while delete command that exception occur. Interesting because if I would add to list from zero to increasing number, no problem. But if I would add them top to zero index then after returning from listing, deleting the array is a nightmare.
    I hope I could explain good. What can I do?

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    Need to see some code to help.

    Probably you go Out Of Bounds in the array. Then it could fail to free.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Ehm! thank you for your interest. You were definitly right. I corrected. It was about array bounds. I'm stupid.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting ListView columns
    By Scarvenger in forum Windows Programming
    Replies: 6
    Last Post: 09-11-2006, 10:10 AM
  2. Troubles with ListView and Toolbar
    By cornholio in forum Windows Programming
    Replies: 8
    Last Post: 11-14-2005, 01:26 AM
  3. ListView Sorting Problem
    By tyouk in forum Windows Programming
    Replies: 2
    Last Post: 01-09-2005, 11:32 AM
  4. Listview sorting...Can't make it work!
    By knutso in forum Windows Programming
    Replies: 4
    Last Post: 10-05-2003, 12:48 PM
  5. Listview??
    By SuperNewbie in forum C# Programming
    Replies: 4
    Last Post: 02-13-2003, 03:34 AM