Enter Button causes a Screen Redirect

7 posts, 0 answers
  1. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 27 Jun 2014 Link to this post

    We have an application that is ASP.net 3.5 using telerik v2.0.50727.  When we select from the dropdown with a mouse click everything works properly, but if the use the enter key when in the control it causes the screen to redirect to another screen.  I am still trying to find out how it is picking the screen it redirects to but why would the enter key cause a different action than a mouse click.  They both run through the SelectedIndexChanged event but for some reason the enter causes a redirect.
  2. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 27 Jun 2014 Link to this post














    Uncaught
    Sys.WebForms.PageRequestManagerServerErrorException:
    Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred
    while processing the request on the server. The status code returned from the
    server was: 0 






  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 27 Jun 2014 in reply to Frank Link to this post

    It appears as after the Selected Index change and the post back is complete it is causing a button click event to fire which has the redirect logic. 
  5. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 27 Jun 2014 in reply to Frank Link to this post

    It also appears to only be an issue in Chrome
  6. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 02 Jul 2014 Link to this post

    Hi Frank,

    The issue described sounds like a bug in the keyboard navigation of RadComboBox or in your custom logic. I have tested it both locally and on our on-line demo but  could not replicate it.

    Would you please elaborate a little bit by sharing the exact code of RadComboBox that you are using so we could inspect it once again and be more helpful?

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 02 Jul 2014 in reply to Plamen Link to this post

    here Is some of the code from the page

    On the HTML Page
     
     <rad:RadComboBox ID="BranchList" runat="server" MarkFirstMatch="True"    OnSelectedIndexChanged="BranchList_SelectedIndexChanged"                  AutoPostBack="True" Height="140px" Width="250px" ToolTip="Select a Branch" AllowCustomText="False"  ExpandEffect="GradientWipe">
     </rad:RadComboBox>
     
    <rad:AjaxSetting AjaxControlID="BranchList">
       <UpdatedControls>
          <rad:AjaxUpdatedControl ControlID="RepList" />
       </UpdatedControls>
    </rad:AjaxSetting>
     
     
     
    Then in the code behind
     
    protected void BranchList_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
            {
                RepList.Items.Clear();
                DatabaseUtilities.RepsByBranch(RepList, BranchList.Text, true, "");
            }
     
     public static void RepsByBranch(RadComboBox aDropDownList, string branchNumber, bool emptyFirstRow, string textForEmptyFirstRow)
            {
     
                SubSonic.StoredProcedure sp = SPs.GetRepsByBranchNumber(branchNumber);
     
                IDataReader aReader = sp.GetReader();
     
                RadComboBoxItem aListItem = null;
     
                if (emptyFirstRow && textForEmptyFirstRow.Length == 0)
                {
                    aListItem = new RadComboBoxItem("", "");
                    aDropDownList.Items.Add(aListItem);
                }
                else if (emptyFirstRow && textForEmptyFirstRow.Length > 0)
                {
                    aListItem = new RadComboBoxItem(textForEmptyFirstRow, "");
                    aDropDownList.Items.Add(aListItem);
                }
     
                //Now add the items to the drop down
                while (aReader.Read())
                {
     
                    aListItem = new RadComboBoxItem(aReader["LastName"].ToString() + ", " + aReader["FirstName"].ToString(), aReader["RepID"].ToString());
                    aDropDownList.Items.Add(aListItem);
                }
     
                aReader.Close();
                aReader.Dispose();
     
            }
  8. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 07 Jul 2014 Link to this post

    Hi Frank,

    I have inspected the code that you shared and the issue is more probably caused by the fact the RadComoboBox have to update itself too and you should add it to the AjaxUpdated Controls of RadAjaxManager.

    I am attaching an isolated page where everything worked correctly at my side. If it still does not work correctly at your side please elaborate a little bit what have to be added to replicate the issue locally.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017