ComboBox.Sorted Propriété
Définition
Obtient ou définit une valeur indiquant si les éléments dans la zone de liste déroulante sont triés.Gets or sets a value indicating whether the items in the combo box are sorted.
public:
property bool Sorted { bool get(); void set(bool value); };
public bool Sorted { get; set; }
member this.Sorted : bool with get, set
Public Property Sorted As Boolean
Valeur de propriété
true
si la zone de liste déroulante est triée ; sinon, false
.true
if the combo box is sorted; otherwise, false
. La valeur par défaut est false
.The default is false
.
Exceptions
Une tentative a été conduite pour trier un ComboBox qui est attaché à une source de données.An attempt was made to sort a ComboBox that is attached to a data source.
Remarques
This property specifies whether the false
, les nouveaux éléments sont ajoutés à la fin de la liste existante.When you set the property to false
, new items are added to the end of the existing list. Le tri ne respecte pas la casse et par ordre alphabétique croissant.The sort is case-insensitive and in alphabetically ascending order.
Toute tentative de définition de la Sorted propriété sur un contrôle lié aux données lève une ArgumentException .Attempting to set the Sorted property on a data-bound control raises an ArgumentException. Vous devez trier les données à l’aide du modèle de données sous-jacent.You must sort the data using the underlying data model.