Skip to main content
Tab

ListBoxColumn Class

Contains settings that define an individual column within list editors.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public class ListBoxColumn :
    WebColumnBase

Remarks

The ListBoxColumn class implements the functionality of a list column. This functionality is used by list editors such as the ASPxComboBox and ASPxListBox. Columns can be used to visually organize an editor’s list data into a more readable and convenient form. Columns are maintained within a collection of the ListBoxColumnCollection type, which can be accessed via the list editor’s Columns property. An individual column can be accessed within the collection using indexer notation.

An editor’s column can be mapped to a data source’s column by using the ListBoxColumn.FieldName property. A column’s visibility can be controlled via the WebColumnBase.Visible property. Use the WebColumnBase.Caption property to define a column’s caption, and the WebColumnBase.Name property to specify a unique identifier for the column.

Example

list-box-column

<dx:ASPxListBox ID="lbModels" SelectionMode="CheckColumn" EnableSelectAll="true" DataSourceID="PhoneModels" ValueField="ID" ValueType="System.String" ... >
     <CaptionSettings Position="Top" />
     <Columns>
          <dx:ListBoxColumn FieldName="Name" Caption="Model" Width="100%" />
          <dx:ListBoxColumn FieldName="Price" Width="50px" />
     </Columns>
</dx:ASPxListBox>
<asp:XmlDataSource ID="PhoneModels" DataFile="~/App_Data/PhoneModels.xml" XPath="//Model" runat="server" />

For a full example, see List Box with Multiple Selection demo.

See Also