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

RadComboBox + RadTooltip for no items found

3 Answers 80 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alan T
Top achievements
Rank 1
Alan T asked on 12 Mar 2012, 11:48 AM

Hi, 

I'm struggling to implement this, i'm not sure why.

I've got a RadComboBox, and i've manually implemented the onitemsrequested event of it, to enable custom loading on demand.

I've then attached my tooltip. Both of which are inside an asp:Panel which is ajaxified using the RadAjaxManager.

<telerik:RadToolTip ID="tt_searchArea_empty" runat="server"
TargetControlID="cbo_searchArea" HideEvent="FromCode" ShowEvent="FromCode" 
RelativeTo="Element">
</telerik:RadToolTip>

   

and show it in code behind (search locations is my combobox's datasource).

   

If search_locations.Count <= 0 Then
Me.tt_searchArea_empty.Text = "Could not find any results for """ & e.Text & ""
Me.tt_searchArea_empty.Show()
End If

And to hide it, i've attached this client side event OnFocus of my combobox:

var tt = '<%=tt_searchArea_empty.ClientID %>';
tt.hide();

3 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 12 Mar 2012, 01:40 PM
Hello Alan,

I'm assuming the show part must work. The problem I see with your js code is that you're not using the $find method to grab the instance of the RadTooltip. You js code should look like this:

var tt = $find('<%=tt_searchArea_empty.ClientID %>');
tt.hide();
0
Alan T
Top achievements
Rank 1
answered on 12 Mar 2012, 03:03 PM
no, the show part is unfortunately not working.

I'm not sure why, that line of code is definately executing. Perhaps its something to do with it being in an ajaxified panel?

My AjaxManager defintiino is basically:

    <telerik:RadAjaxManager ID="ram_home" runat="server" DefaultLoadingPanelID="ralp_front">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="pnl_searchBox">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnl_searchBox" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

where all controls mentioned are inside pnl_searchBox.
0
Alan T
Top achievements
Rank 1
answered on 13 Mar 2012, 10:06 AM

I ended up doing this via client side methods instead. 

Can be closed. 

Tags
ComboBox
Asked by
Alan T
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Alan T
Top achievements
Rank 1
Share this question
or