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

[Solved] Click to close does not work

1 Answer 134 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
uber bloke
Top achievements
Rank 1
uber bloke asked on 08 Sep 2009, 11:10 AM
Using the example on http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

Click to the LEFT of the arrow in Type, (in the white box area) the combo box opens

Do not move the mouse, click again, the combo box remains open, a standard HTML select list would close if it was clicked again.

I have looked and tried but I cant for the life of me work out how to get the control to close, you are forced to move again to the arrow, or out of the drop down...

Am I missing something or is there a way to get this control to work like a select list?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Sep 2009, 05:39 AM
Hi,

Try out the following client side code and see whether it meets your requirement.

ASPX:
 
 <telerik:RadComboBox ID="RadComboBox2" DataSourceID="SqlDataSource1" EmptyMessage="All Types" ShowDropDownOnTextboxClick="false" > 
            </telerik:RadComboBox> 


JS:
 
<script type="text/javascript"
 
var combo; 
function pageLoad() 
    combo = $find("<%= RadComboBox2.ClientID %>"); 
    combo.get_inputDomElement().attachEvent('onclick',function1); 
 
function function1() 
    combo._toggleDropDown();         
}  
 
</script> 

Note: Set the ShowDropDownOnTextboxClick property of the RadCombobox to fasle.

Regards
Shinu
Tags
ComboBox
Asked by
uber bloke
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or