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

Enter Button causes a Screen Redirect

6 Answers 66 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 27 Jun 2014, 02:44 PM
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.

6 Answers, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 27 Jun 2014, 02:46 PM













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 






0
Frank
Top achievements
Rank 1
answered on 27 Jun 2014, 07:23 PM
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. 
0
Frank
Top achievements
Rank 1
answered on 27 Jun 2014, 08:23 PM
It also appears to only be an issue in Chrome
0
Plamen
Telerik team
answered on 02 Jul 2014, 08:39 AM
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.

 
0
Frank
Top achievements
Rank 1
answered on 02 Jul 2014, 12:14 PM
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();
 
        }
0
Plamen
Telerik team
answered on 07 Jul 2014, 12:03 PM
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.

 
Tags
ComboBox
Asked by
Frank
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or