Save/Reload Selected Tab

6 posts, 0 answers
  1. Michelle
    Michelle avatar
    24 posts
    Member since:
    Aug 2007

    Posted 16 Oct 2008 Link to this post

    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
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Oct 2008 Link to this post


    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bill
    Bill avatar
    94 posts
    Member since:
    Aug 2006

    Posted 25 Oct 2008 Link to this post

    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
  5. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 05 Dec 2008 Link to this post

    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.
  6. Bill
    Bill avatar
    94 posts
    Member since:
    Aug 2006

    Posted 05 Dec 2008 Link to this post

    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

     

     

     

     

     

  7. Atlas
    Atlas avatar
    97 posts
    Member since:
    Jun 2009

    Posted 19 Aug 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017