Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2007

Tip: Looking for answers? Try searching our database.

Listbox Sorting in .NET 3.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RSienkiewicz - 09 Aug 2007 17:18 GMT
Am I crazy, is there no sorting of listboxes under .NET 3.0. Make a new app,
add a listbox and see no Sorted property. Add strings and they just go to the
bottom.

Thanks,
Rich Sienkiewicz
Inflexis Corp.
pvdg42 - 09 Aug 2007 18:36 GMT
> Am I crazy, is there no sorting of listboxes under .NET 3.0. Make a new
> app,
[quoted text clipped - 5 lines]
> Rich Sienkiewicz
> Inflexis Corp.

Documentation indicates:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.listbox.sorted.aspx

Have you tried accessing/setting the public property in code?
RSienkiewicz - 09 Aug 2007 18:48 GMT
Sorted is not in my intelli-sense. Same with a ListView, it has no Sorting
property like the help says it should. And I get compile errors if I try to
use it ("does not contain a definition for Sorted"). This is .NET 3.0 being
developed with VS 2005.

Thanks,
Rich Sienkiewicz

> > Am I crazy, is there no sorting of listboxes under .NET 3.0. Make a new
> > app,
[quoted text clipped - 11 lines]
>
> Have you tried accessing/setting the public property in code?
RSienkiewicz - 09 Aug 2007 19:32 GMT
Even unser VS2008 Beta 2 I get no Sort or Sorting property on ListBox and
ListView. What gives?

> Sorted is not in my intelli-sense. Same with a ListView, it has no Sorting
> property like the help says it should. And I get compile errors if I try to
[quoted text clipped - 19 lines]
> >
> > Have you tried accessing/setting the public property in code?
pvdg42 - 09 Aug 2007 22:40 GMT
> Even unser VS2008 Beta 2 I get no Sort or Sorting property on ListBox and
> ListView. What gives?
[quoted text clipped - 9 lines]
>> Thanks,
>> Rich Sienkiewicz

Right you are, in a WPF application. When I create a Windows Forms
application in VS 2008 Beta 2, the Sorted property is there for the ListBox.
Similarly, if I create a Windows Forms app in VS 2005 (with .NET 3.0 and
extensions installed), I get the "standard" ListBox with the Sorted
property. If I create a .NET 3.0 app in VS 2005, I get the "other" LIstBox
with no Sorted property. I don't know the difference in WPF (yet), but I'm
going to look into it further and will get back to you if I discover
anything interesting.
pvdg42 - 09 Aug 2007 22:47 GMT
> Even unser VS2008 Beta 2 I get no Sort or Sorting property on ListBox and
> ListView. What gives?

It didn't take me long to find this:

http://msdn2.microsoft.com/en-us/library/aa970268.aspx#Controls

The WPF has it's own controll classes which are definitely different from
the control classes that support Windows Forms. You've found one significant
difference.
moo - 14 Aug 2007 19:28 GMT
I've also noticed that the System.Web.UI ListBox control does *not*
implement Sort() either. Anyone know why?

> > ListView. What gives?
>
[quoted text clipped - 5 lines]
> the control classes that support Windows Forms. You've found one significant
> difference.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.