starnge behavior with multi-select combobox

2 posts, 0 answers
  1. Anumeha
    Anumeha avatar
    36 posts
    Member since:
    Aug 2010

    Posted 12 Oct 2010 Link to this post

    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.
  2. Yana
    Admin
    Yana avatar
    4813 posts

    Posted 18 Oct 2010 Link to this post

    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
Back to Top