In Combo box options, when I click on empty space on the dropdown items (other than checkbox and label) the item text is showing in the textbox eventhough check box is not selected.
Added image for your reference.
And I tried to find the length of the checked items while drop down closed and if its 0 then am manually clearing out the textbox control.
Saying that, checked item length is always returns 0.
Code for your reference.
function OnClientDropDownClosing(sender, eventArgs) {
var combo = $find("<%= rcbPatientType.ClientID %>");
if (combo.get_checkedItems().length < 1) {
combo.set_text("");
}
}
In the image you can see the spot I have marked where I click, at that time 'All ' checkbox is not checked but its shown in textbox
Now what I want is, either click on empty space should not work otherwise the item checkbox should be checked on clicking the equivalent empty space
Added image for your reference.
And I tried to find the length of the checked items while drop down closed and if its 0 then am manually clearing out the textbox control.
Saying that, checked item length is always returns 0.
Code for your reference.
function OnClientDropDownClosing(sender, eventArgs) {
var combo = $find("<%= rcbPatientType.ClientID %>");
if (combo.get_checkedItems().length < 1) {
combo.set_text("");
}
}
In the image you can see the spot I have marked where I click, at that time 'All ' checkbox is not checked but its shown in textbox
Now what I want is, either click on empty space should not work otherwise the item checkbox should be checked on clicking the equivalent empty space