ajax page when enter key happen whille focus on the text field

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 16 Jul 2010 Link to this post

    I have a text field, a button and a radgrid on the page.  If without puting ajax on the page, when focus on the text area and hit the enter key, it will hit the Button1_Click1 event, but after I put ajax (I user radajax manager) on the page, when button click only refresh the radgrid, it won't go to the Button1_Click1 event when hit the enter key while focus on the text area.  Why? and how to solve the problem?

    Thanks!

  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 21 Jul 2010 Link to this post

    Hi Jessie,

    In order to achieve the desired functionality, you can wire the OnTextChanged server-side event of the textbox and use the following code:
    protected void TextBox1_TextChanged(object sender, EventArgs e)
        {
            RadAjaxManager.FocusControl("Button1");
        }

    Please, let me know if this works fine on your side.

    Regards,
    Tsvetina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top