Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ComboBox.Sorted Property

Gets or sets a value indicating whether the items in the combo box are sorted.

[Visual Basic]
Public Property Sorted As Boolean
[C#]
public bool Sorted {get; set;}
[C++]
public: __property bool get_Sorted();
public: __property void set_Sorted(bool);
[JScript]
public function get Sorted() : Boolean;
public function set Sorted(Boolean);

Property Value

true if the combo box is sorted; otherwise, false. The default is false.

Exceptions

Exception Type Condition
ArgumentException An attempt was made to sort a ComboBox that is attached to a data source.

Remarks

This property specifies whether the ComboBox sorts exisitng entries and add new entries to the appropriate sorted position in the list. You can use this property to automatically sort items in a ComboBox. As items are added to a sorted ComboBox, the items are moved to the appropriate location in the sorted list. When you set the property to false, new items are added to the end of the existing list. The sort is case-insensitive and in alphabetically ascending order.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ComboBox Class | ComboBox Members | System.Windows.Forms Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.