ASPxClientListBox.SetItemTooltip(index, tooltip) Method

Sets the tooltip text for the list box editor’s item specified by its index.

Declaration

SetItemTooltip(
    index: number,
    tooltip: string
): void

Parameters

Name Type Description
index number

An integer value specifying the zero-based index of the item.

tooltip string

A string value specifying the tooltip text.

Example

The following example illustrates how to specify a tooltip for list box items using the ASPxClientListBox.SetItemTooltip method.

ASPxListBox-SetItemTooltip

<dx:ASPxListBox ID="ASPxListBox1" runat="server" ClientInstanceName="clientListBox" DataSourceID="SqlDataSource1">
    <ClientSideEvents Init="function(s, e) {
        for (i = 0 ; i < clientListBox.GetItemCount(); i++){
            clientListBox.SetItemTooltip(i, '<' + clientListBox.GetItem(i).text + '>' + ' tooltip');
        }                
    }" />
    <Columns>
        <dx:ListBoxColumn FieldName="ProductName" />
    </Columns>
</dx:ASPxListBox>
See Also