Back to Devexpress

TokenBoxSettings Class

aspnetmvc-devexpress-dot-web-dot-mvc-c3d5a1f4.md

latest3.0 KB
Original Source

TokenBoxSettings Class

Contains the TokenBox extension settings.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public class TokenBoxSettings :
    AutoCompleteBoxBaseSettings
vb
Public Class TokenBoxSettings
    Inherits AutoCompleteBoxBaseSettings

Remarks

To declare the TokenBox in a View, invoke the ExtensionsFactory.TokenBox helper method. This method returns the TokenBox extension that is implemented by the TokenBoxExtension class.

To configure the TokenBox extension, pass the TokenBoxSettings object to the ExtensionsFactory.TokenBox helper method as a parameter. The TokenBoxSettings object contains all the TokenBox extension settings.

Refer to the TokenBox Overview topic to learn how to add the TokenBox extension to your project.

To access the TokenBox specific settings, refer to the TokenBoxSettings.Properties property.

cshtml
@Html.DevExpress().TokenBox(settings =>
{
    settings.Name = "tokenBox1";

    settings.Properties.TextField = "Name";
    settings.Properties.ValueField = "Email";

    settings.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
    settings.Properties.IncrementalFilteringDelay = 500;
}).BindList(Model).GetHtml()

The image below illustrates the results.

Inheritance

Object SettingsBase EditorSettings AutoCompleteBoxBaseSettings TokenBoxSettings

See Also

TokenBoxSettings Members

TokenBox

TokenBoxExtension

DevExpress.Web.Mvc Namespace