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

starnge behavior with multi-select combobox

1 Answer 51 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Anumeha
Top achievements
Rank 1
Anumeha asked on 12 Oct 2010, 06:23 PM
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:
<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.

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Oct 2010, 09:29 AM
Hi Anumeha,

I'm afraid that the provided code is not enough for us to reproduce this issue. Could you please send us more detailed code? Thanks in advance

Kind regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Anumeha
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or