ASPxClientComboBox.SetItemTextCellAttribute(itemIndex, textCellIndex, attributeName, attributeValue) Method
In This Article
Adds a custom attribute to a combo box item’s text cell.
#Declaration
TypeScript
SetItemTextCellAttribute(
itemIndex: number,
textCellIndex: number,
attributeName: string,
attributeValue: string
): void
#Parameters
Name | Type | Description |
---|---|---|
item |
number | The item’s index. |
text |
number | The text cell’s index. |
attribute |
string | The attribute name. |
attribute |
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