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

CloseDropDownOnBlur doesn't always work with LoadOnDemand

2 Answers 140 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 29 Nov 2010, 10:11 PM
I have a RadComboBox using LoadOnDemand with CloseDropDownOnBlur set to true. I also let the user enter custom text. However, if the user enters the text and tabs out of the field before the combo is done "loading" the values, the dropdown won't disappear until you go back to the cell and leave it again.

Any ideas?

2 Answers, 1 is accepted

Sort by
0
Brad
Top achievements
Rank 1
answered on 02 Dec 2010, 09:39 PM
Is everyone on vacation?
0
Kalina
Telerik team
answered on 03 Dec 2010, 06:34 PM
Hi Brad,

Let me suggest you handle the pageLoad client-side event and within the handler function attach "keydown" event at RadComboBox input.
Then you can easily hide the dropdown if the Tab key has been pressed:
<script type="text/javascript">
function pageLoad() {
    var combo = $find("<%=rcboBookingNum.ClientID %>");
    $telerik.$(combo.get_inputDomElement()).keydown(function (e) {
         
        if (e.keyCode == 9) {
 
            if (combo.get_dropDownVisible()) {
                combo.hideDropDown();
            }
        }
    });
}
</script>

Please find more details at the sample page attached.

Best wishes,
Kalina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
ComboBox
Asked by
Brad
Top achievements
Rank 1
Answers by
Brad
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or