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

Minor RadComboBox closing behavior problem

4 Answers 45 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 19 Mar 2013, 09:19 PM
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?

4 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 22 Mar 2013, 04:20 PM
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.
0
Boris
Top achievements
Rank 1
answered on 22 Mar 2013, 05:31 PM
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>
0
Dimitar Terziev
Telerik team
answered on 27 Mar 2013, 05:11 PM
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.
0
Boris
Top achievements
Rank 1
answered on 27 Mar 2013, 05:20 PM
You're missing the point.  I know why and where it's failing.  I thought you wanted a demo anyway of the click behavior.
Tags
ComboBox
Asked by
Boris
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Boris
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or