Having trouble getting MultiPage to go to specific view programatically

2 posts, 0 answers
  1. toddhd
    toddhd avatar
    21 posts
    Member since:
    Aug 2006

    Posted 22 Mar 2011 Link to this post

    I have a TabStrip that is connected to a MultiPage. When using the UI, these two items are synched up correctly.

    I use the tabs in a pseudo-wizard type application. When my app starts, all the tabs but the first one are disabled.  There is a button on the first tab (multipage actually) that when pressed, "starts" the process, and clicking it should enable all the other tabs, and move you to the second tab in the process to begin the data entry.

    Here is my basic setup (partially removed items to condense code)
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Telerik" MultiPageID="RadMultiPage1">
            <telerik:RadTab runat="server" Text="Order Setup" Value="OrderSetup" PageViewID="rpvOrderSetup" Selected="true" />
            <telerik:RadTab runat="server" Text="Patient Information" Value="PatientInformation" PageViewID="rpvPatientInformation" Enabled="false" />
            <telerik:RadTab runat="server" Text="Order Information" Value="OrderInformation" PageViewID="rpvOrderInformation" Enabled="false" />
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
        <telerik:RadPageView ID="rpvOrderSetup" runat="server" Selected="true">
            <hr style="margin: 0px; padding: 0px; width: 100%;" />
            <local:OrderSetup runat="server" ID="OrderSetup" />
        <telerik:RadPageView ID="rpvPatientInformation" runat="server">
            <hr style="margin: 0px; padding: 0px; width: 100%;" />
            <local:PatientInformation runat="server" ID="PatientInformation" />
        <telerik:RadPageView ID="rpvOrderInformation" runat="server">
            <hr style="margin: 0px; padding: 0px; width: 100%;" />
            <local:OrderInformation runat="server" ID="OrderInformation" />

    And here is the code behind:
    void OrderSetup_Click(EventArgs e)
        RadTabStrip1.FindTabByValue("OrderSetup").ImageUrl = "~/images/Ok.png";
        IList<RadTab> tabs = RadTabStrip1.GetAllTabs();
        foreach (RadTab tab in tabs) tab.Enabled = true;
        RadTabStrip1.FindTabByValue("PatientInformation").Selected = true;
        RadMultiPage1.FindPageViewByID("rpvPatientInformation").Selected = true;
        // RadMultiPage1.SelectedIndex = RadMultiPage1.FindPageViewByID("rpvPatientInformation").Index;
                // rpvPatientInformation.Selected = true;           
               // RadMultiPage1.SelectedIndex = 1; 

    Most of this works. The image is added to the first tab, all the tabs are enabled, and the Patient Information tab is selected.

    But what does NOT work is that the matching PageView is NOT selected. It still displays the PageView of the first tab.

    What am I doing wrong?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Mar 2011 Link to this post


    Your code works perfectly in my end when I attached the "OrderSetup_Click" with a ButtonClick event.
    Have you ajaxified the controls on page? If so you need to set the AjaxSettings properly to take the effect on page.
    Add AjaxSettings programmatically

  3. DevCraft R3 2016 release webinar banner
Back to Top