Tab
A newer version of this page is available. Switch to the current version.

GridViewDataTokenBoxColumn Class

A data column with the token box editor.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class GridViewDataTokenBoxColumn :
    GridViewEditDataColumn
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:

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

<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

See Also