Skip to main content
Tab

ListBoxColumn.CellTemplate Property

Gets or sets a common template used for displaying the content of all cells within the list box.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(null)]
public virtual ITemplate CellTemplate { get; set; }

Property Value

Type Default Description
ITemplate null

An object supporting the System.Web.UI.ITemplate interface which contains the template used for displaying the content of all cells within the list box.

Remarks

Use the CellTemplate property to define a common content for all cells within the current list box control. The template created using this property replaces the content of each cell within the list box.

<dx:ASPxComboBox ID="CmbCustomers" runat="server" DataSourceID="CustomersDataSource" ValueField="CustomerID"
        ValueType="System.String" TextFormatString="{0}" EnableCallbackMode="true" IncrementalFilteringMode="StartsWith"
        CallbackPageSize="30">
     <Columns>
          <dx:ListBoxColumn FieldName="ContactName" />
          <dx:ListBoxColumn FieldName="CompanyName" />
          <dx:ListBoxColumn FieldName="Country" />
          <dx:ListBoxColumn FieldName="Phone" />
          <dx:ListBoxColumn FieldName="HasDiscount">
               <CellTemplate>
                    <dx:ASPxCheckBox ID="ASPxCheckBox1" runat="server" Value='<%# Eval("HasDiscount") %>' />
               </CellTemplate>
          </dx:ListBoxColumn>
     </Columns>
</dx:ASPxComboBox>
See Also