Groups | Blog | Home
all groups > dotnet compact framework > january 2006 >

dotnet compact framework : .net cf 2.0 combobox sort issue, need help


Marc
1/21/2006 12:38:38 PM
Hello,



I've been searching all over google, msdn, books, etc. and for the life of
me I can't figure out how to sort a combobox.



Right now I populate a combobox by reading in lines from a text file. That
part works fine, but the contents of the combobox are not sorted and I'd
like to do that.



The only reference I've found on msdn is that the standard "sorted" property
of the combobox has been removed in the .net cf. So what to do then?



I'm sure I'm not the only one who's having this issue - I'm trying to move
from evb to .net cf and this is such a pain. I'm thinking how much easier
it would be if Microsoft would just write evb compatible runtimes, then we
wouldn't have to re-write all of our applications for Windows Mobile 5.0.



Please any help, examples or points in the right direction would be greatly
appreciated.



Marc







Tim Wilson
1/21/2006 4:11:43 PM
You can use a method similar to the one outlined in the quickstart below.
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/listviewsort.aspx

--
Tim Wilson
..NET Compact Framework MVP

[quoted text, click to view]

Joseph Byrns
1/22/2006 8:19:55 AM
Or you could stick them in a DataTable, create a dataview of the table with
a sort of your required sort and populate the combobox from the dataview,
either by databinding or just filling it directly.

Additionally there are loads of psort algorithms on internet you could use.

[quoted text, click to view]

Tome
1/22/2006 2:45:25 PM
or you can use third pary controls like
http://www.labitweb.com/pocketpc_controls_vds.aspx
:)



[quoted text, click to view]

AddThis Social Bookmark Button