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

How to cancel ClientDropDownClosing handler when losing combo focus

1 Answer 33 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 24 Feb 2009, 07:13 PM
I'm handling a combo ClientOnDropDownClosing event in javascript. If I drop down the combo and then click off of (lose focus on) the combo, is it possible to see that the combo has lost focus in the DropDownClosing event before executing the code?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Feb 2009, 06:07 AM
Hi Scott,

Try the following JavaScript function for cancelling the ClientDropDownClosing() handler when clicking outside the RadComboBox.

JavaScript:
<script type="text/javascript"
function OnClientDropDownClosing(sender, args) 
    var combo1= $find('<%=RadComboBox1.ClientID %>'); 
    var temp = combo1._onFocus(); 
    if(temp) 
        args.set_cancel(true); 
</script> 

Thanks,
Shinu.
Tags
ComboBox
Asked by
Scott
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or