I have a multi-select combobox defined on my page with checkboxes and radio buttons in the template.
I am observing a strange behavior with the dropdown.
To close the dropdown I have to click outside of the combo.
On my save I pop-up a radalert that says that data is saved. If the user checks something in the combo and directly clicks save without clicking out anywhere on the form the pop-up takes two clicks to close. If I again repeat the same steps it increments another click till the time i refresh the page.
combo declaration:
Javascript:
This is very annoying for the client. Can you suggest something.
I am observing a strange behavior with the dropdown.
To close the dropdown I have to click outside of the combo.
On my save I pop-up a radalert that says that data is saved. If the user checks something in the combo and directly clicks save without clicking out anywhere on the form the pop-up takes two clicks to close. If I again repeat the same steps it increments another click till the time i refresh the page.
combo declaration:
<
telerik:RadComboBox
runat
=
"server"
ID
=
"RadComboBoxParticipants"
EnableLoadOnDemand
=
"false"
Width
=
"350px"
OnPreRender
=
"RadComboBoxParticipants_PreRender"
AllowCustomText
=
"true"
LoadingMessage
=
"loading.."
OnClientSelectedIndexChanging
=
"OnClientSelectedIndexChanging"
CloseDropDownOnBlur
=
"true"
OnClientDropDownOpening
=
"OnClientDropDownOpening"
OnClientDropDownClosing
=
"OnClientDropDownClosing"
OnClientBlur
=
"OnClientBlur"
OnItemDataBound
=
"RadComboBoxParticipants_ItemDataBound"
>
<
ItemTemplate
>
<
table
>
<
tr
>
<
td
>
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
onclick
=
"stopPropagation(event, this);"
ToolTip
=
"Adds as option"
/>
</
td
>
<
td
>
<
asp:RadioButton
ID
=
"RadioButton1"
runat
=
"server"
GroupName
=
"Type"
onclick
=
"SetUniqueRadioButton();"
ToolTip
=
"Sets as default"
/>
</
td
>
<
td
>
<%# DataBinder.Eval(Container.DataItem,"FullName") %>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
<
CollapseAnimation
Type
=
"OutQuint"
Duration
=
"200"
></
CollapseAnimation
>
</
telerik:RadComboBox
>
Javascript:
var supressDropDownClosing = false;
function OnClientDropDownClosing(sender, eventArgs) {
eventArgs.set_cancel(supressDropDownClosing);
}
function OnClientSelectedIndexChanging(sender, eventArgs) {
eventArgs.set_cancel(supressDropDownClosing);
}
function OnClientDropDownOpening(sender, eventArgs) {
supressDropDownClosing = true;
}
function OnClientBlur(sender) {
supressDropDownClosing = false;
sender.toggleDropDown();
}
function stopPropagation(e, chk) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
}
This is very annoying for the client. Can you suggest something.