Case Study #41 - Use of Col, MagicCell and varies display attributes in Grid and Form

The dbGridCol and dbFormCol properties control the display of grid and form when the page size (grid) and field number (form) is out of propertion. Look at the following example browser output -

ASP Code -

<CENTER><h2>Sample DB with 133 fields - Use of dbFormCol and GridCol</h2></CENTER>
<%
Set X=Server.CreateObject("Asp.DB")
X.dbunit=1
X.dbmode="dual-horiz"
X.dbNavigationIcon="std"
X.dbImageDir="images/"
X.dbDSN="provider=Microsoft.Jet.OLEDB.3.51; data source=e:\vData\AAMA\CAR_DIM.mdb"
X.dbGridDisplayFlds="0"
X.dbOptions="GridIndex=false"
X.dbGridIndex=false
X.dbSQL="Select * FROM h_dimension"
X.dbMagicCell="0,,,index,indexanchor"
X.dbFormMagicCell="0,,<I><B>#0#</B></I>"
X.dbGridTableTag="border=1"
X.dbFormTableTag="border=1"
X.dbFormCol=9
X.dbGridCol=2
X.dbGridInc=28
X.ASPdb
%>

Browser Output -

The above example has 133 fields and to display them in a form mode in a single column will be inappropriate. dbFormCol will enable a "snake" effect such that the form column will be split in to x columns. Note that the grid is also split into 2 columns. The goal is to maximize the screen real estate in a display.

Grid and Form MagicCell is also used here to present different Magic effects in grid and form.