Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

after quiet some time I finally found the problem why my ListView control isn't sorted despite the sorting:

 

As soon as I add groups to the listview and assign them to the listviewitems (which are added after the groups are added),

the ListView doesn't respect the insert method, it behaves as if I would use add instead.

Immediately after setting

lstvw_HistoryEps.ShowGroups = False

the order of the listviewitems is correct.

 

Does somebody know whats going on here?

Posted (edited)

Adding didn't solve the problem.

 

I didn't notice that there was a ListViewItemSorter element in the ListView available,

so I've written my own sorting code, with which it doesn't work (as described above).

 

If I use ListViewItemSorter to sort it works as it should.

 

Although both ways should work, I'm going with the ListViewItemSorter since it means less code to write for me.

 

Although it still interests me why it doesn't work my (old) way.

 

EDIT

 

OK it does work, but going with the ListViewItemSorter it is much slower than doing the sorting myself.

 

So if you/anyone has another idea why it doesn't work...

Edited by Arokh

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...