Radcomboboxitem tooltip

1 Answer 21 Views
ComboBox
Francisco
Top achievements
Rank 1
Francisco asked on 09 Mar 2022, 06:35 PM

I have a radcombobox and I add items with radcomboboxitems, how can I set a tooltip for each item in c#?

 

RadComboBox vRadComboBoxControl = new RadComboBox();

vRadComboBoxControl.ID = vCampo.CL_CAMPO;
vRadComboBoxControl.AutoPostBack = true;
vRadComboBoxControl.EmptyMessage = "Seleccionar";
vRadComboBoxControl.Width = Unit.Percentage(100);
vRadComboBoxControl.Filter = RadComboBoxFilter.Contains;
vRadComboBoxControl.ToolTip = vCampo.NB_TOOLTIP;

 

vRadComboBoxControl.Items.AddRange(oCatalogoValorNegocio.Obtener_C_CATALOGO_VALOR(ID_CATALOGO_LISTA: vIdCatalogoLista).Select(x => new RadComboBoxItem(x.NB_CATALOGO_VALOR.ToString(), x.ID_CATALOGO_VALOR.ToString())));
                           

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 10 Mar 2022, 11:43 AM

Hello Francisco,

The items have the ToolTip property so you can iterate them and assign them, or use the ItemDataBound event, depending on your binding method.

<telerik:RadComboBox ID="RadComboBox1" runat="server" RenderMode="Lightweight">
    <Items>
        <telerik:RadComboBoxItem Text="Item 1" />
        <telerik:RadComboBoxItem Text="Item 2" />
        <telerik:RadComboBoxItem Text="Item 3" />
        <telerik:RadComboBoxItem Text="Item 4" ToolTip="my item 4 tooltip" />
    </Items>
</telerik:RadComboBox>

Regards,
Peter Milchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ComboBox
Asked by
Francisco
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or