Listview sorting by group of items
-
Hi all, i need to sort a listview based on the item tag property (as a category) in fact, the listview is populated with a folder content from windows explorer. when i click on the column header, i need to sort by name the folders and the after the files Example : the desired result MyFolder YourFolder MyFile YourFile instead of MyFile MyFolder YourFile YourFolder thanks for any idea, snippet code or a link best regards Fady Sayegh
-
Hi all, i need to sort a listview based on the item tag property (as a category) in fact, the listview is populated with a folder content from windows explorer. when i click on the column header, i need to sort by name the folders and the after the files Example : the desired result MyFolder YourFolder MyFile YourFile instead of MyFile MyFolder YourFile YourFolder thanks for any idea, snippet code or a link best regards Fady Sayegh
The
ListView
class has, oh surprise, aSort
method. It offers a default sorting order, however it also provides a custom sorting order. MSDN holds the essential information, and one of my articles (see link in sig) deals with sorting in general, it does not mention ListView in particular. :)Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
The
ListView
class has, oh surprise, aSort
method. It offers a default sorting order, however it also provides a custom sorting order. MSDN holds the essential information, and one of my articles (see link in sig) deals with sorting in general, it does not mention ListView in particular. :)Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
Hi Luc, thanks for your quick answer. can you please provide me the link to your article. sorry but i have clicked on the link [My Articles] but i didn't find any article about sorting issues can you please redirect me to the right url. thanks again for your help Best regards Fady Sayegh
-
Hi Luc, thanks for your quick answer. can you please provide me the link to your article. sorry but i have clicked on the link [My Articles] but i didn't find any article about sorting issues can you please redirect me to the right url. thanks again for your help Best regards Fady Sayegh
just enter sorting and click the find button, that should do it. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
just enter sorting and click the find button, that should do it. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
Well your title "Sorting a Collection" only gives a small clue. ;)
I must get a clever new signature for 2011.
Yeah, I spend most of my time searching for catchy, unexpected and mysterious titles, and yet I often fail at it. :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
-
Hi all, i need to sort a listview based on the item tag property (as a category) in fact, the listview is populated with a folder content from windows explorer. when i click on the column header, i need to sort by name the folders and the after the files Example : the desired result MyFolder YourFolder MyFile YourFile instead of MyFile MyFolder YourFile YourFolder thanks for any idea, snippet code or a link best regards Fady Sayegh
Seriously? see here[^] There has always been a sort in list view. It is amazing that you are asking such a fundamental question.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]
-
Hi all, i need to sort a listview based on the item tag property (as a category) in fact, the listview is populated with a folder content from windows explorer. when i click on the column header, i need to sort by name the folders and the after the files Example : the desired result MyFolder YourFolder MyFile YourFile instead of MyFile MyFolder YourFile YourFolder thanks for any idea, snippet code or a link best regards Fady Sayegh