|
Navigation -DynaTree with Raw Data Format |
In the first version of the Dynamic Tree, The Microsoft Tree control was
used. The performance was slow, low capacity nodes and the tree works with a
corresponding Framework version only. Customization was also impossible. A
faster and more versatile version was developed and it has a few customized
unique features that you would not find in any other navigation trees.
This example use a hard coded raw format tree data file (car.txt), The data
feed of the tree can be either from memory, Database or text file. There are
numerous controls for the tree in every aspect. You can set the link as URL,
Javascript, script, click and ext. In additional to the leave firing node, Every
node of Dynatree can be a firing node. Another unique feature is that the node
uses a tooltip like message to display long lines.
Main Frame Code - Setup Left and Right FRAME
|
<!--T_TreeFrame_1.html-->
<FRAMESET cols="25%,*">
<FRAME SCROLLING='yes' NAME="main" SRC='T_showtree_1.aspx'>
<FRAME NAME='disp' SRC='T_showcar.aspx'>
</FRAMESET>
|
Left Frame Tree Code - Data from file - Raw
Format
|
<!--T_showtree_1.aspx-->
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim Rm As New Tornado.Z()
Dim Params as string="tdfp=car.txt|
wi=200| he=500|menustyles=5| mbg=ffffff| mifp=aspdbmenuicons1.gif|
sifp=aspdbmenuscroll.gif| fontsize2=11|
fontname0=Verdana| fontname1=Verdana| fontname2=Verdana| fontname3=Verdana|
textstyle2=1| xoffset0=4| xoffset1=4| xoffset2=4| xoffset3=3|
hovercolor0=6E6E6E| hovercolor1=6E6E6E |hovercolor2=6E6E6E |hovercolor3=6E6E6E|
opencolor0=FF0000| opencolor1=FF0000| opencolor2=FF0000| visitedcolor0=a5a5a5|
Visitedcolor1=a5a5a5| visitedcolor2=a5a5a5| visitedcolor3=a5a5a5| nodeheight=1|
Type=file"
Rm.dbTreeParams = Params
Response.Write(Rm.ASPdbTree())
End Sub
</script> |
Right Frame Display Code
|
<!--T_showcar.aspx-->
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim aa As String = Request.QueryString("V2")
If aa <> "" Then
Dim DY5 As New Tornado.Z()
With DY5
.dbQP="U=56| S=bluebricks| M=f|
D=car2000.Mdb| Mts=-1| Th=tit=Dynamic Tree"
.dbSQL = "SELECT * FROM
Carspecs WHERE car = '" & aa & "'"
.dbFormTemplate =
"file=/tornado/templates/Autosales/eg_CarDisplaytemplate1.html"
.dbFormMagicCell = "fi=Price|macro=#Price::Currency#,fi=Picture|macro=<IMG
width=256 SRC='/tornado/DB/images-car/#picture#'>"
.ASPdbNET()
End With
Else
response.write("<body bgcolor='#ffffff'
leftmargin='0' marginwidth='0' topmargin='0' marginheight='0'>")
response.write("<img src='/tornado/templates/autosales/logo.jpg'
width='585' height='240' border='0'></body>")
End If
End Sub
</script>
|
Tree Data - Car.txt (partial display just to
illustrate the Raw format)
|
<!--Car.txt--> item:ASP-db Auto Sales|1|2
item:Acura|1|0
item:1997|2|0
item:CL|3|1|url:/tornado/ShowCar.aspx?V0=Acura&V1=1997&V2=CL,disp
item:Integra|3|1|url:/tornado/ShowCar.aspx?V0=Acura&V1=1997&V2=Integra,disp
item:NSX|3|1|url:/tornado/ShowCar.aspx?V0=Acura&V1=1997&V2=NSX,disp
item:RL|3|1|url:/tornado/ShowCar.aspx?V0=Acura&V1=1997&V2=RL,disp
item:SLX|3|1|url:/tornado/ShowCar.aspx?V0=Acura&V1=1997&V2=SLX,disp
item:TL|3|1|url:/tornado/ShowCar.aspx?V0=Acura&V1=1997&V2=TL,disp
item:AM General|1
item:1997|2
item:Hummer|3|1|url:/tornado/ShowCar.aspx?V0=AM%20General&V1=1997&V2=Hummer,disp
item:Audi|1
item:1997|2
item:A6|3|1|url:/tornado/ShowCar.aspx?V0=Audi&V1=1997&V2=A6,disp
item:A6 Wagon|3|1|url:/tornado/ShowCar.aspx?V0=Audi&V1=1997&V2=A6%20Wagon,disp
item:A8|3|1|url:/tornado/ShowCar.aspx?V0=Audi&V1=1997&V2=A8,disp
item:Cabriolet|3|1|url:/tornado/ShowCar.aspx?V0=Audi&V1=1997&V2=Cabriolet,disp
item:1998|2
item:A4|3|1|url:/tornado/ShowCar.aspx?V0=Audi&V1=1998&V2=A4,disp
...
...
... |
Inline Format
This raw data format file can also be in an 'inline' format. That means all
the lines in the file can be joined by the 'delimiter' value (def = ~) to create
a string varable for dbTreeData. The purpose fo this format is to allow code
generated data. If you need to read data from several sources to create a tree,
youcan use this format.