RadAjaxLoadingpanel focus is lost of the current field

4 posts, 1 answers
  1. Suzy
    Suzy avatar
    66 posts
    Member since:
    Nov 2014

    Posted 03 Dec 2014 Link to this post

    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?

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 08 Dec 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Suzy
    Suzy avatar
    66 posts
    Member since:
    Nov 2014

    Posted 08 Dec 2014 in reply to Viktor Tachev Link to this post

    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?
  5. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 11 Dec 2014 Link to this post

    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.

     
Back to Top