This is a migrated thread and some comments may be shown as answers.

radcombobox in radtooltip items update clientside

1 Answer 106 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 11 Aug 2016, 11:53 AM

I am trying to alter the items collection of a radcombobox which is placed in a radtooltip with JS like

 

  <telerik:RadToolTip ID="tt_svg_combo" HideEvent="ManualClose" OffsetX="20" RenderMode="Lightweight" Skin="Default" Width="400" Height="400" runat="server">
       <telerik:RadComboBox ID="rcb_tooltip" runat="server"><Items>
            <telerik:RadComboBoxItem Text="aa" Value="aa" />
                                                             </Items></telerik:RadComboBox>
    </telerik:RadToolTip>

 

 

and JS:

  var ott
                    ott = $find("<%=tt_svg_combo.ClientID%>");
                    var combo = $find("<%= rcb_tooltip.ClientID%>");
                    var items = combo.get_items();
                    combo.trackChanges();
                    var comboItem

var str='1$2$3$4$5'
                    var a = str.split("$");

                    for (i = 0; i < a.length; i++) {
                        comboItem = new Telerik.Web.UI.RadComboBoxItem();
                        comboItem.set_text(a[i]);
                        comboItem.set_value(a[i]);
                        items.add(comboItem);
                    }

                    combo.commitChanges();
                }
              
                setTimeout(function () {
                    ott.show();
                }, 1000);

 

None of the added items are showing up on tooltip show.

When I place rcb on the page itself it works OK

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 16 Aug 2016, 08:01 AM
Hello,

The items are added correctly but the dropdown is with lower index that the ToolTip and that is why you do not see the items. Here is a sample implementation of the ComboBox with z-index higher than the ToolTip:

<telerik:RadComboBox ID="rcb_tooltip" runat="server" Style="z-index: 10000">
    <Items>
        <telerik:RadComboBoxItem Text="aa" Value="aa" />
    </Items>
</telerik:RadComboBox>

Here is a forum thread with similar issue: Combobox in Tooltip - show dropdown on load.

Regards,
Peter Milchev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
ComboBox
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Peter Milchev
Telerik team
Share this question
or