c# How can i sort a listview when the form loads -


i have listview (lvmap) 3 columns (map, from, to) trying write method called form loads. method should @ listview items , and sort them 2 columns "map" , "from" in ascending order, dont want sort "to" column. have written code below sorts every single column, there way leave column out of sorting procedure. thanks.

private void sortlistvieworder() {     lvmappings.sorting = sortorder.ascending;     lvmappings.sort(); } 

i suggest consult following msdn article, hopeful answers question:

http://support.microsoft.com/kb/319401

basically need create listviewcolumnsorter instance , add listview control.

from there on article have enough information :)


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -