Navigation - Buttons

Navigation is big part of a web presentation as it directs all the traffic by either taking your users to a links or perform a service request for them like adding records to the database or downloading a file. So, The user is either looking at the web page content or clicking away at the navigation buttons. Tornado offers many navigation options including user customizable ones.

Buttons

There are many illustrations in this demo showing the default navigation buttons. The following code demonstrate that these buttons can be positioned almost anywhere.

<!--T_Navigation_1.aspx-->

<script language='vb' runat='server'>
Sub Page_Load(Source as Object, E as EventArgs)
   Dim Nav As New Tornado.Z()
   Nav.dbQP = "U=2| M=G| S=20| DSN=Nwind.Mdb| Q=Orders| TH=Title=Built-in Navigation Buttons| gdf=0,1,2| gridtemplate=[[GridNav]]<p>[[Grid]]<p>[[GridNav]]<P>[[GridStat]]"
   Nav.ASPdbNET()
End Sub
</script>

The flexibility of placing the Navigation as well as the Grid, form, chart and other objects is via a template. INternally, Tornado use templates to conduct the positioning tasks and these templates can be changed by users via the templates properties. In this example, the obj.dbGridTemplate (gtp) is changed to include an extra copy of the navigation bar at the top.

Aside from the clicking of the navigation button, there is an input option where user can specify which record to go to - Record number, Page, numeric, logical (e.g. Value > ?) etc. Quite flexible indeed. OH, BTW, the field value type is autodetected! For example, If you are navigating in the Date field for example, Tornado is smart enough to know it is a date.

<!--T_Navigation_2.aspx-->

<script language='vb' runat='server'>
Sub Page_Load(Source as Object, E as EventArgs)
   Dim Nav As New Tornado.Z()
   Nav.dbQP = "U=2| M=G!sup=t| sgtf=1| S=20| D=Nwind.Mdb| Q=Orders| TH=Title=Built-in Navigation Buttons| gdf=0,1,2| gridtemplate=[[GridNav]]<p>[[Grid]]<p>[[GridNav]]<P>[[GridStat]]"
   Nav.ASPdbNET()
</script>

To accomplish the 'Goto Record', Only two properties are added - SuprtGoto=True and SuperGotoFld=1. If no Supergotofld is specified then field "0"is used. Now, input a 'B' in the input box and click 'Go', The record pointer will advance to the first record starts with a "B".

How far can you go with the customization? There are several internal customized Navigation templates to illustrate the extend of customization. You'll find the answer is "As far as your imagination can go". Observe !

<!--T_Navigation_3.aspx-->

<script language='vb' runat='server'>
Sub Page_Load(Source as Object, E as EventArgs)
   Dim bar As New Tornado.Z()
   With bar
      .dbQP = "U=12| M=g| S=watch| D=Nwind| Ps=10| Gdf=0,1,2,3| Ni=b5| Th=Title=Built-in Navigation Bars Type #3"
      .dbSQL = "Select * From orders order by employeeid, customerid"
      .dbGridMagicCell = "fi=3|mac=#3:d#"
      .dbSuperBar = "type=3"
      .dbSuperGotoFld = "1"
      .ASPdbNET()
   End With
</script>

This might seem a bit too much for a navigation bar and may be too colorful also, but the idea is to prove that it can handle the most demanding cases.

In additional to buttons navigation, Menu navigation is also available. See next illustration.