![]() |
|
[.NET] Sort Listview with doubles - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Sort Listview with doubles (/showthread.php?tid=5814305) |
Sort Listview with doubles - Soldiercrimes - Mar 21, 2018 ![]() Anybody knows how to sort these asc/desc? Tried it but couldn't find a good solution to sort it. RE: Sort Listview with doubles - Ninja - Mar 21, 2018 I have not used this personally, but maybe you can use this: https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.sorting.aspx This will put items that are added in the correct spot, not sort existing items. RE: Sort Listview with doubles - Soldiercrimes - Mar 21, 2018 (Mar 21, 2018 04:55 PM)Ninja Wrote: I have not used this personally, but maybe you can use this: Is it even possible to make that work with doubles? i thought it would only work with strings. RE: Sort Listview with doubles - Ninja - Mar 22, 2018 (Mar 21, 2018 11:19 PM)Soldiercrimes Wrote: Is it even possible to make that work with doubles? i thought it would only work with strings. Why not just try it? Also, on the page it said that if you want to use your own sorting then you should use the ListViewItemSorter in combination with the Sort method: https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemsorter.aspx https://msdn.microsoft.com/en-us/library/system.windows.forms.listview.sort.aspx |