In windows phone 8.1 list, I want to add sorting. User can change the order of a column data into ascending and descending.
Is it possible in windows phone 8.1 application? if yes, please paste some sample code here.
Check out <CollectionViewSource>
: MSDN CollectionViewSource . It basically has almost everything you're looking for. They have a nice example at the bottom of the page.
With the right LINQ statements and orderby you can sort your list the way you want, then you can assign this sorted list as the ItemsSource of a ListView
or whatever UI container of your choosing.
There is no SortedList for Windows Phone 8.1 but Google has provided a nice replacement:
You can also try SortedDictionary.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.