Skip to main content

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

Adds a custom attribute to a combo 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:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="DataSource1"
    ValueField="CategoryID" ValueType="System.String" TextFormatString="{0} ({1})" >
    <Columns>
        <dx:ListBoxColumn FieldName="CategoryName" Width="100px" />
        <dx:ListBoxColumn FieldName="Description" Width="300px" />
    </Columns>
</dx:ASPxComboBox>
<br />
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Set Attribute" >
    <ClientSideEvents Click="OnClick" />
</dx:ASPxButton>
See Also