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

Save/Reload Selected Tab

5 Answers 556 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Michelle
Top achievements
Rank 1
Michelle asked on 16 Oct 2008, 09:38 PM
How does one save the selected tab, so when an AJAX update occurs to rebind a control, the same tab stays selected?

Details:  I have a FormView.  Inside the FormView, I have a RadTabStrip control.  If the user clicks the third tab, for example, and then clicks the "Refresh" button, I'd like to load the third tab as the selected tab.  How can I do that?

Thanks,
Michelle

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 20 Oct 2008, 02:07 PM

Hi Michelle,

You need to explicitly set the selected tab after ajax callback. The topic on Get the previously selected tab will help you achieve the required functionality.


All the best,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
GDPR_erased
Top achievements
Rank 1
answered on 25 Oct 2008, 02:22 PM
My senario is a little more complicated.
I select my "Tab", and then, on the selected tab-pageview, I have a button that pops open a radWindow. From the pop-up window, they select something, then when the popup window closes, I'm running the function:
OnClientClose="ReloadOnClientClose"
--------
function ReloadOnClientClose(sender, eventArgs) {
window.location.href = window.location.href;
}
 This is so the page will reload and refresh the datagrid with what the user added, however, it of course goes back to the first tab like the window was opened for the first time. Is there a way to make it go back to the tab they were on?
Thanks,
~bg
0
Paul
Telerik team
answered on 05 Dec 2008, 11:54 AM
Hi Bill,

I'm afraid we cannot understand your requirement. I think it will be best if you can open a support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Thanks beforehand for your patience and cooperation,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
GDPR_erased
Top achievements
Rank 1
answered on 05 Dec 2008, 12:54 PM
Hey, thanks for the help, but I found a work around..
It might not be the best, or right thing to do, but whenever I open a radwindow, I set the session varible for a tab:

(This is on the rad window that opens)

 

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load   
    If Not Page.IsPostBack Then   
       Session("Tab") = "Journal"  
   End If  
End Sub   
 

 

Then, on the original page, I use this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
   If Not Page.IsPostBack Then  
      If Session("Tab") <> "" Then   
       RadTabStrip1.FindTabByValue(Session("Tab")).Selected = True   
       RadMultiPage1.FindPageViewByID RadTabStrip1.SelectedTab.PageViewID).Selected = True   
       Session("Tab") = ""   
      End If  
   End If  
End Sub  
 
 


It seems to work OK, but my original problem was this.... I want to open a rad window, pick an item (it then writes to the database) and when they close the radwindow, I want to refreshthe datagrid on the original page, but I have to refresh the whole page (the original page). that is all I know to do.
Thanks,
~bg

 

 

 

 

 

0
Atlas
Top achievements
Rank 1
answered on 19 Aug 2009, 05:40 PM
Wow, I am reading Bobs question, and I have the exact same issue. I am perplexed that you don't understand the problem. You have a tab set, one of the tabs opens a rad window and updates info on one of the tabs, when closing the rad window how do you select a particualr tab and refresh the data so the data in the tab reflects whatever change was made in the rad window.

In my case we have a tab called notes, in order to add a new note, you click on a button that opens a rad window. After entering the new note, I want the notes tab to be refreshed and selected.
Tags
TabStrip
Asked by
Michelle
Top achievements
Rank 1
Answers by
Peter
Telerik team
GDPR_erased
Top achievements
Rank 1
Paul
Telerik team
Atlas
Top achievements
Rank 1
Share this question
or