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

I think you cheated with Load on Demand & RadPageView demo

1 Answer 92 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 13 Apr 2010, 03:27 PM
Sorry for the title but I hope I got your attention, and yes you have cheated :-)

With respect to this article - http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx

I'm trying to do a similar thing, except my tabs have spaces in the names. Hence when I click on a tba the page errors in this code block because its passing back the tab name as previously set up, and its look for a page with the tab name ie with a space.

        Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated  
            Dim userControlName As String = e.PageView.ID & "VB.ascx"   PAGE ERRORS HERE
            Dim userControl As Control = Page.LoadControl(userControlName)  
            userControl.ID = e.PageView.ID & "_userControl"  
            e.PageView.Controls.Add(userControl)  
        End Sub 

I have tried setting the ID property but it looks like it Read Only. You have only got this code to work by using Single words for the tab names (hence the cheat) .

How can I achieve this.

Andy

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 15 Apr 2010, 11:59 AM
Hi Andy Green,

The article is only a demonstration of load-on-demand approach with RadTabStrip and RadMultiPage, you can modify it according to your needs.

I suggest in your case to use Value property of the tabs instead of Text property to load the pageviews and user controls. I've attached a simple page demonstrating this.

Greetings,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabStrip
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or