ASPxClientListBox.SetItemTextCellAttribute(itemIndex, textCellIndex, attributeName, attributeValue) Method

Adds a custom attribute to a list box item’s text cell.

Declaration

SetItemTextCellAttribute(
    itemIndex: number,
    textCellIndex: number,
    attributeName: string,
    attributeValue: string
): void

Parameters

Name Type Description
itemIndex number

The item’s index.

textCellIndex number

The text cell’s index.

attributeName string

The attribute name.

attributeValue string

The attribute value.

Remarks

<dx:ASPxListBox ID="lbModels" runat="server" ClientInstanceName="listBox" DataSourceID="DataBase1" 
    ValueField="ID" ValueType="System.String" >
    <Columns>
        <dx:ListBoxColumn FieldName="Name" />
        <dx:ListBoxColumn FieldName="Price" />
    </Columns>
</dx:ASPxListBox>
<br />
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Set Attribute" >
    <ClientSideEvents Click="OnClick" />
</dx:ASPxButton>
See Also