Results 1 to 8 of 8

Thread: Sorting Listview quickly

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    usa
    Posts
    100

    Sorting Listview quickly

    Does anyone have any suggestion on how to make a listview sort quickly?
    I loaded data from an Access db, and whenever I try to sort by clicking the Option Button, it takes a while.

  2. #2
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    have you tried turning the listview property 'Sorted' to true?

  3. #3
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    I can't think of any other way than you order them in Database and then load...

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    usa
    Posts
    100

    Sorting Listview Quickly

    Yes...Geespot, I have the Sorted property checked
    Moin, will that make it sort faster?

  5. #5
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Certainly it would.. but. then you could only order the things when you load them from table....so it would do bad rather than good.
    Is your listview multicolumn? and you want to sort on any column???????

  6. #6
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555
    I did something similar with a treeview. When I wanted to sort it, I just threw out all the information, did another call to the database and repopulated it. If you turn off window redraw first it helps with the speed.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Location
    usa
    Posts
    100

    Sorting Listview Quickly

    Moin..I have 5 columns, and I would like to sort it on any column

  8. #8
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Then do it the way I mentioned earlier.. Clear the listview send a command to database to order on your desired field and re-populate...
    But I doubt about its usefulness

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