4

I have a WPF ListBox which shows a list of employees names. I want to group and sort them alphabetically. Is this possible? if so, how? Also, i will be required to style the headers (like the attached image) Could some1 guide me as to how i can achieve this. Thanx!

This is the kind of listbox style i would liek to achieve

Sangeetha
  • 485
  • 2
  • 9
  • 24
  • Is the sort order always the English one, or do you want to support the various national ways of sorting accented characters (like ážü) or for example the Czech way of treating Ch as its own letter sorted after H? – svick Jun 27 '11 at 21:43

1 Answers1

6

You can group items by adding GroupDescription to the CollectionView. See this related question:

How do I group items in a WPF ListView

Also, google GroupDescription for many more examples.

Community
  • 1
  • 1
ColinE
  • 68,894
  • 15
  • 164
  • 232