Minor RadComboBox closing behavior problem

5 posts, 0 answers
  1. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 19 Mar 2013 Link to this post

    Sorry.  Memory (and coffee cup) refreshed.  This problem happens whenever you have a OnClientSelectedIndexChanged call in a RadComboBox dropdown and something crashes in the JavaScript function. 

    Someone refresh my memory.  (I know I've seen this before.)

    I have two RadComboBoxes in two separate screens.

    One is within a Form Template and the other is not, but their settings and treatment are virtually identical.

    The one inside the form template will only close if you double-click on a selection.

    The other only requires a single click.

    Suggestions?
  2. Nencho
    Admin
    Nencho avatar
    1822 posts

    Posted 22 Mar 2013 Link to this post

    Hello Boris,

    Could you provide us with the implementation of the RadComboBox that you are using. In addition, which version of our controls are you using? Under which browsers do you observe this issue?


    All the best,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 22 Mar 2013 Link to this post

    Ok, here's a very simple example.  No cs file involved, just the aspx.  I've attached the dropdown to a grossly wrong javascript function.

    This is using Telerik version 2012.2.607.40.  I do most of my development in Chrome.  It looks like Firefox behaves the same.  Internet Explorer is worse.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication3.WebForm2" %>
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
         <script type="text/javascript">

             function test(sender, args) {
                 var combo1 = $telerik.findControl(editForm, 'IDontExist');
             }

        </script>
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                    </asp:ScriptReference>
                </Scripts>
            </telerik:RadScriptManager>
        <div>    
            <telerik:RadComboBox ID="RadComboBox1" Runat="server" OnClientSelectedIndexChanged="test">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" />
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" />
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" Value="RadComboBoxItem3" />
                </Items>
            </telerik:RadComboBox>   
        </div>
        </form>
    </body>
    </html>
  4. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 27 Mar 2013 Link to this post

    Hello Boris,

    I have inspected the provided information and the current implementation will case a javascript error since the "editForm" is undefined. Apart from this javascript error the control is working properly at my end. Please remove the following line var combo1 = $telerik.findControl(editForm, 'IDontExist'); or just substitute it with the following statement var combo1 = sender; and check whether the problem persist.

    Regards,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 27 Mar 2013 Link to this post

    You're missing the point.  I know why and where it's failing.  I thought you wanted a demo anyway of the click behavior.
Back to Top