vb.net - How do I arrange Items in a List-box? -


i working on vb windowsforms application. form has listbox contains numbers items. not arranged numeric sequence like..

01 09 02 07 ... 

i want arrange them numeric sequence such as..

01 02 07 09 ... 

i have not got idea doing so.

thank you

you can use method , call sort function...

private sub sortlistbox(byval listbox listbox) dim templist new list(of integer) each li in listbox.items     templist.add(integer.parse(li.tostring())) next templist.sort() listbox.datasource = templist end sub 

then call after have added items...

 sortlistbox(listbox1) 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -