RadComboBox Enter Key

2 posts, 0 answers
  1. Ryan Grossman
    Ryan Grossman avatar
    12 posts
    Member since:
    Nov 2009

    Posted 02 May 2015 Link to this post

    I'm trying to get the enter key to submit a combobox. I tried the following but it doesn't run the btnSave onclick event. It just postback the page without doing anything and I don't see the AjaxManager loading panel.

    <script type="text/javascript">  function HandkeKeyPress(sender, eventArgs)  {     if (eventArgs.get_domEvent().keyCode == 13)     {        __doPostBack('Button2','');     }  }  </script> 

     

    This executes the onclick event but generates a console error TypeError: sender.raise_SelectedIndexChanged is not a function

     

    function ClientKeyPressingCombo(sender, eventArgs) {
                    if (eventArgs.get_domEvent().keyCode == 9) { }
                    else if (eventArgs.get_domEvent().keyCode == 13) {
                        sender.raise_SelectedIndexChanged();
                    }
                }

     

     

  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 06 May 2015 Link to this post

    Hi Ryan,

    You could trigger click event with jquery on the button or make an ajax request with the Manager.

    Regards,
    Peter Filipov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

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