ListBoxProperties.DataSecurityMode Property
Gets or sets whether users can select values that do not exist in the Items collection.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
[DefaultValue(DataSecurityMode.Default)]
public DataSecurityMode DataSecurityMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
DataSecurityMode | Default | An enumeration value. |
Available values:
Name | Description |
---|---|
Default | The data editor allows users to enter and select custom items. |
Strict | The data editor does not allow users to enter and select custom items. |
Remarks
Note
The ListBoxExtension‘s DataSecurityMode
property has no effect.
The list box editor allows users to select values that do not exist in the bound item collection. Set the editor’s DataSecurityMode
property to Strict
to prevent users from setting the editor Value to a value not listed in the Items collection. Refer to the following topic for more information: Validation in List Editors.
<dx:ASPxListBox ID="ASPxListBox1" runat="server" DataSecurityMode="Strict" EnableSynchronization="False">
<Items>
<dx:ListEditItem Text="Item 1" Value="Item 1" />
<dx:ListEditItem Text="Item 2" Value="Item 2" />
<dx:ListEditItem Text="Item 3" Value="Item 3" />
</Items>
</dx:ASPxListBox>
When the list box is in Strict
security mode, the EnableSynchronization is not in effect.