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

RadAjaxLoadingpanel focus is lost of the current field

3 Answers 38 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Suzy
Top achievements
Rank 2
Suzy asked on 03 Dec 2014, 10:09 AM
I have several fields on my panel that is ajaxified with RadAjaxManager, using RadAjaxLoadingPanel.  When a partial postback occurs and LoadingPanel is shown, the focus of the field is lost.

For example I have two field, and the first field has a OnTextChanged Event triggered with autopostback is set true.  When I type in a value in the first field and press tab, the partial postback is triggered, the Loadingpanel appears but when the postback is finished, no field has focus.  I would expect the second field to have the focus.

This works with asp:updatepanel and ajax.
Any ideas on how to fix this?

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 08 Dec 2014, 09:03 AM
Hello Suzy,

RadAjaxManager enables you to set the focus to specific control. You need to use the FocusControl method of RadAjaxManager. If you would like to see a live illustration of the functionality you would find the following demo interesting:



Regards,
Viktor Tachev
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
Suzy
Top achievements
Rank 2
answered on 08 Dec 2014, 11:18 AM
In other words, I have to do this manually for every postback that can occur in all my (more then 100) screens?  There is no way that RadAjaxManager remembers the current cursor position and stays on that field?
0
Accepted
Viktor Tachev
Telerik team
answered on 11 Dec 2014, 08:20 AM
Hi Suzy,

If you would like to keep the focus to the current input you can add the following line to the TextChanged event of the input controls:

protected void RadTextBox1_TextChanged(object sender, EventArgs e)
{
    RadAjaxManager1.FocusControl(sender as RadTextBox);
}


Regards,
Viktor Tachev
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
Ajax
Asked by
Suzy
Top achievements
Rank 2
Answers by
Viktor Tachev
Telerik team
Suzy
Top achievements
Rank 2
Share this question
or