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

Problem with Radtabstrip having place holder instead of MultipageView

5 Answers 62 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Pams
Top achievements
Rank 1
Pams asked on 16 Mar 2011, 10:24 PM
Hello,

I am using RadtabStrip with two tabs. Previously i had problem of executing the page life cycle of all active tabs when post back occurs in anyone of the tabs.
I followed this thread and replaced multipageview with place holder for usercontrols. I didn't use ViewState[""].
http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/dynamic-loaded-controls-keep-running-even-if-not-active.aspx

Our requirement is different. Unless user enters data in first tab and clicks button (Like wizard), user willn't be allowed to go to next tab.
I am able to do that. But, under button click, though the second user control is loaded on screen, the first tab is still in the selection mode.
How can I change the selection mode to second tab when I transfer the user from one tab to next using the code.

I tried doing this.
In the parent page.aspx: I have

<telerik:RadTabStrip ID="RadTabStrip2" EnableTheming="true" runat="server" OnTabClick="RadTabStrip2_TabClick"
         AutoPostBack="True" SelectedIndex="0">
            <Tabs>
                <telerik:RadTab runat="server" Text="Simple control" Value="0">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Timer Control" Value="1"  Enabled="false">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip> 

Under Button click
            RadTabStrip tabStrip = (RadTabStrip)Page.FindControl("RadTabStrip1");
            RadTab Tab2 = tabStrip.FindTabByText("Timer Control");           
            Tab2.Enabled = true;
            Tab2.Selected = true;

Panel Panel1 = (Panel)Page.FindControl("Panel1");

            //Clear panel controls and add the newly loaded control
            Panel1.Controls.Clear();
            Panel1.Controls.Add(control);


I would like to attach the sample project. Could you pls let me know the process of attaching whole project.

Any help would be appreciated.

Thanks in Advance

5 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 18 Mar 2011, 12:04 PM
Hello Pams,

As this is a Forum post - you are not allowed to attach .zip files. As an alternative you can post a new Support thread and attach the project there or you can use one of the sites for free online storage like 4shared.com and keep the conversation here.

Regards,
Veronica Milcheva
the Telerik team
0
Pams
Top achievements
Rank 1
answered on 18 Mar 2011, 02:02 PM
Hello,
Thanks for your reply. Did you get my problem. Could you pls suggest the solutions.

Thanks
0
Veronica
Telerik team
answered on 18 Mar 2011, 02:07 PM
Hi Pams,

Unfortunately without debugging I can not find where the problem is. That's why I am asking whether you can attach your code so I can inspect it and help you.

All the best,
Veronica Milcheva
the Telerik team
0
Pams
Top achievements
Rank 1
answered on 18 Mar 2011, 04:31 PM
Hello,
I have the attached the file as you suggested and here is that link.
http://www.4shared.com/file/qnUsk1Uk/RadtabStripView.html

In this solution there are two aspx pages.
WebForm1.aspx----Where I used a place holder for usercontrols
WebForm2.aspx----Where I used multipage view.

The first user control is SimpleControl.ascx and second TimerControl.ascx.

Once the user clicks Create button in first usercontrol, then only we should allow the user to go to second user control. After that, user should be able to jump between tabs.
Note: In SimpleControl.ascx.cs, there are two btn_Click events and one is commented. The two methods are one for each aspx page.

I even placed pageLoad and pageUnload functions in javascripts for all aspx pages and also ascx pages.
You can see that page load of usercontrols is not proper when create button is clicked/tab is clicked.
Did I do any mistake.
Thanks

0
Veronica
Telerik team
answered on 24 Mar 2011, 01:14 PM
Hello Pams,

I'll need some more time to investigate the issue. I'll contact you as soon as I find a solution.

Thank you for your patience.

Regards,
Veronica Milcheva
the Telerik team
Tags
TabStrip
Asked by
Pams
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Pams
Top achievements
Rank 1
Share this question
or