Hello Telerik,
I have this in my .ASPX page:
I am trying to create dynamic Tabs in a single Tabstrip that points to dynamic PageViews in a single MultiPage with the dynamic PageViews pointing to dynamic Contents within dynamic UserControls.
I have this in my code behind:
I can't seem to make it work.
Any ideas, suggestions, feedback or sample application would be much appreciated.
Thanks in advance,
Virgil Rodriguez
I have this in my .ASPX page:
<
div
id
=
"divTabs"
runat
=
"server"
>
<
telerik:RadTabStrip
ID
=
"rtsArticles"
runat
=
"server"
SelectedIndex
=
"0"
MultiPageID
=
"rmpArticles"
Skin
=
"Default"
Width
=
"100%"
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"rmpArticles"
runat
=
"server"
SelectedIndex
=
"0"
Height
=
"100%"
Width
=
"100%"
>
</
telerik:RadMultiPage
>
</
div
>
<
div
id
=
"divGroups"
runat
=
"server"
>
<
asp:Panel
ID
=
"pnlGroups"
runat
=
"server"
>
<
asp:Repeater
ID
=
"rptGroups"
runat
=
"server"
EnableTheming
=
"True"
OnItemDataBound
=
"GroupRepeater_ItemDataBound"
>
<
ItemTemplate
>
<
div
id
=
"divDivGroups"
runat
=
"server"
style
=
"border-bottom:1px dashed silver;"
>
<
asp:Label
ID
=
"hlGroups"
runat
=
"server"
Text='<%# DataBinder.Eval(Container.DataItem, "group_text") %>'></
asp:Label
>
</
div
>
</
ItemTemplate
>
</
asp:Repeater
>
</
asp:Panel
>
</
div
>
I am trying to create dynamic Tabs in a single Tabstrip that points to dynamic PageViews in a single MultiPage with the dynamic PageViews pointing to dynamic Contents within dynamic UserControls.
I have this in my code behind:
Protected
Sub
GroupRepeater_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
System.Web.UI.WebControls.RepeaterItemEventArgs)
Dim
item
As
RepeaterItem
item = e.Item
Dim
userCtrl
As
HtmlControl = item.FindControl(
"divDivGroups"
)
If
item.ItemType = ListItemType.Item
Or
item.ItemType = ListItemType.AlternatingItem
Then
Dim
strGroupNumber
As
String = item.DataItem("group_id").ToString
Dim
tab
As
New
RadTab
Dim
rtsArticles
As
RadTabStrip
Dim
rpageView
As
New
RadPageView
Dim
rmpArticles
As
RadMultiPage
tab.Text = strGroupNumber
tab.PageViewID =
"rpv"
& strGroupNumber
rtsArticles = item.Parent.Parent.Parent.Parent.FindControl(
"divTabs"
).FindControl(
"rtsArticles"
)
rtsArticles.Tabs.Add(tab)
rpageView.ID =
"rpv"
& strGroupNumber
userCtrl.ID =
"divUser"
& strGroupNumber
rmpArticles = item.Parent.Parent.Parent.Parent.FindControl(
"divTabs"
).FindControl(
"rmpArticles"
)
rpageView.Controls.Add(userCtrl)
rmpArticles.PageViews.Add(rpageView)
End If
End
Sub
I can't seem to make it work.
Any ideas, suggestions, feedback or sample application would be much appreciated.
Thanks in advance,
Virgil Rodriguez