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

Autosave when changing Tabs

1 Answer 60 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 13 Mar 2009, 09:42 AM
We are using the Tabstrip and dynamically loading usercontrols the first time a user clicks on each tab.
There is one particular tab that I need to automatically call a save method in the usercontrol if a user navigates from this tab to another.

Please can someone post an example of how to save changes on a tab when a user changes to another tab.

I have tried the following:
OnClientSelecting - cancel the event and envoke a postback for the current tab with arguments that are checked in the Page Load.
The problem with this approach is that the user has to click twice on another tab before it changes because I'm cancelling the event.

Any suggestions welcomed.

Many thanks
Antony

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 16 Mar 2009, 02:23 PM
Hi Antony,

I would suggest the following:

  1. Add a RadAjaxManager to your page and subscribe to its AjaxRequest event
  2. Use the ClientTabSelected event and trigger an ajax request when needed:
    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
    ajaxManager.ajaxRequest();
  3. The previous step would trigger the server-side AjaxRequest event where you can save the changes

I hope this helps,
Albert
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TabStrip
Asked by
Antony
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or