Back to Devexpress

GridViewDataTokenBoxColumn Class

aspnet-devexpress-dot-web-7fdb529f.md

latest3.7 KB
Original Source

GridViewDataTokenBoxColumn Class

A data column with the token box editor.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class GridViewDataTokenBoxColumn :
    GridViewEditDataColumn
vb
Public Class GridViewDataTokenBoxColumn
    Inherits GridViewEditDataColumn

Remarks

A GridViewDataTokenBoxColumn object is a data column with the token box editor. Use the GridViewDataTokenBoxColumn.PropertiesTokenBox property to access and customize the column editor’s settings.

Note

  • Specify a column’s TextField and ValueField property values for correct operation.
  • In a data source, a column values should be unique.

Data Source Specifics

A data source should store token values separated by the character that you specify in the ValueSeparator property (“,” by default).

A sample format of the data source that contains token box values:

sql
ID UserName Roles  
3 Fuller Andrew 1,4  
4 Dodsworth Anne 3  
5 Leverling Janet 5,9,10  
6 Callahan Laura 10  
7 Peacock Margaret 2,9  
8 Suyama Michael 8,6  
9 Davolio Nancy 4,5  
10 King Robert 7,6  
11 Buchanan Steven 5

Example

aspx
<dx:ASPxGridView ID="grid" runat="server" ...>
    <Columns>
        ...
        <dx:GridViewDataTokenBoxColumn FieldName="Roles" VisibleIndex="2">
            <PropertiesTokenBox DataSourceID="UserRolesDataSource" TextField="Name" ValueField="ID" AllowCustomTokens="false">
            </PropertiesTokenBox>
        </dx:GridViewDataTokenBoxColumn>
    </Columns>
    ...
</dx:ASPxGridView>

Concept

Data Columns

Online Demo

ASPxTokenBox - Token Box Column

Implements

IStateManager

IPropertiesOwner

IExpressionsAccessor

IDataSourceViewSchemaAccessor

IFilterablePropertyInfo

IWebGridDataColumn

IWebGridColumn

Inheritance

Object StateManager CollectionItem WebColumnBase GridViewColumn GridViewDataColumn GridViewEditDataColumn GridViewDataTokenBoxColumn

See Also

GridViewDataTokenBoxColumn Members

Grid View

GetValue

DevExpress.Web Namespace