Fill Tabstrip Control dynamically with multiple treeview controls

B

Brian Watkins

I am trying to dyanmically add tabs to my tabstrip control and then build a
different treecontrol for each tab on my tab control.
Basically the Tabstrip control would have n number of tabs/pageviews and
each pageview would have its own treeview.
Any suggestions on how I could tweak the code below to make this whole thing
dynamic? Thanks in advance

Here is how I statically create the tabstrip with one tab and one treeview

<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="mytab" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls %>
<%@ register TagPrefix="mytree" Namespace="Microsoft.Web.UI.WebControls"
Assembly ="Microsoft.Web.UI.WebControls" %>

<script runat="server" >

Sub Page_Load(sender as Object, e As EventArgs)

IF Not IsPostBack Then
Call FillTreeView()

End IF

End Sub

Sub FillTreeView()

'fill treeview code here

End Sub

<html>
<head>
<body>
<form id=f1 runat="server">

<mytab:TabStrip id="tsDocuments" runat="server" TargetID="mpHoriz">
<mytab:Tab Text="Tab1" />
<mytab:TabSeparator />
</mytab:TabStrip>
<mytab:MultiPage id="mpHoriz" runat="server">

<mytab:pageView>
<table>
<tr>
<td>
<MYTREE:TREEVIEW ID="tvwDirectory" RUNAT="server" CHILDTYPE="Directory"
<MYTREE:TREENODETYPE
TYPE="Directory"
CHILDTYPE="Files, Folders"
/>
<MYTREE:TREENODETYPE
TYPE="Folders"
CHILDTYPE="Files, Folders"
/>
<MYTREE:TREENODETYPE
TYPE="Files"
/>
</MYTREE:TREEVIEW>
</td>
</tr>
</table>
</mytab:pageView>

</mytab:MultiPage>

</FORM>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top