ASPxTokenBox.Value Property
Gets or sets the editor value.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Description |
---|---|
Object | An Object that contains the editor’s value. |
Remarks
The token Value corresponds to the ASPxTokenBox.Tokens collection via the ASPxAutoCompleteBoxBase.Items collection. The editor looks for an item with the corresponding ListEditItem.Text property value for every token. If an item is found, its ListEditItem.Value property value is added to the Value property; otherwise, the token text is added. The values are separated with the sign specified by the ASPxTokenBox.ValueSeparator property.
On the client side, you can get and set the editor value using the ASPxClientTokenBox.GetValue and ASPxClientTokenBox.SetValue methods.
If the Value
property returns null
, make sure that you set the ItemValueType property to an .NET type that matches the ValueField column type. Otherwise, the editor cannot find the corresponding item because the editor’s ItemValueType property does not match the item type (String by default).
Example
This example demonstrates how the ASPxClientTokenBox.SetValue and ASPxClientTokenBox.GetValue methods are applied to the token box, and how the editor ASPxTokenBox.Value
property corresponds to editor tokens.
myToken.SetValue('naomi.moreno@example.net,heidi.lopez@example.net,jessie.she@example.net');