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

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

1 Answer 31 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 16 Jul 2010, 05:47 PM
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!

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 21 Jul 2010, 09:46 AM
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
Tags
Ajax
Asked by
JJ
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or