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

Tooltip + RadComboBox

0 Answers 69 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Alan T
Top achievements
Rank 1
Alan T asked on 25 Jul 2012, 10:53 AM
Hi I have a RadCombobox that is Enable Load On Demand - Handled code side.

I've attached an event to the OnClientItemsRequested event, which displays a tooltip if the text entered into the RadCombobox does not return any items. - I did it client side as i was having difficulties getting it to work by showing it from the code behind.

The majority of cases this is fine, but i've experienced it sometimes showing before any results have been returned from the database.

I have one client who is being quite insistant in telling me that he can type something, gets a tooltip showing 'No results for <his search>' when there are actually results for his search, they just haven't been returned from the database yet.

Can someone suggest how I can prevent this happening, and only show the Tooltip if no results are returned.

Here is the code for my 'checkFound' function incase you need it.

function checkFound(sender, args) {
    var count = sender.get_items().get_count()
    if (count <= 0 && sender.get_text().length > 0) {
        var tt = $find('<%=tt_searchArea_empty.ClientID %>');
        tt.set_text("No results found for '" + sender.get_text() + "'");
        tt.show();
    }
    else {
        hideAreaEmptyToolTip();
    }
}
 
function hideAreaEmptyToolTip() {
    var tt = $find('<%=tt_searchArea_empty.ClientID %>');
    tt.hide();
}

No answers yet. Maybe you can help?

Tags
ToolTip
Asked by
Alan T
Top achievements
Rank 1
Share this question
or