ASPxClientListBox.SetItemAttribute(index, attributeName, attributeValue) Method

Adds a custom attribute to a list box item.

Declaration

SetItemAttribute(
    index: number,
    attributeName: string,
    attributeValue: string
): void

Parameters

Name Type Description
index number

The item index.

attributeName string

The attribute name.

attributeValue string

The attribute value.

Remarks

<dx:ASPxListBox ID="ASPxListBox1" runat="server" ClientInstanceName="listBox" >
    <Items>
        <dx:ListEditItem Text="Item 1" Value="Item 1" />
        <dx:ListEditItem Text="Item 2" Value="Item 2" />
        <dx:ListEditItem Text="Item 3" Value="Item 3" />
    </Items>
</dx:ASPxListBox>

<br />
<dx:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Text="Set Attribute" >
    <ClientSideEvents Click="OnClick" />
</dx:ASPxButton>
See Also