Tornado API Library - V12.30.08

z.dbNameMap Property

NameMap for the Grid. Rename the field names in the header display and optionally supply the calculated expression required for sort, edit and filter criteria.

Product Version

EP, Gold
[VisualBasic]
PublicPropertydbNameMapAsString
[C#]
publicstringdbNameMap{set;}

Property Value

Obj.dbNameMap="(;,)Field |Alias | Tag=HeaderTags | Formula=CalcExp, ...repeat"

KeywordDescription
FieldField name or ordinal number of Grid or Form to be mapped. Field=CustomerID , Field=0
AliasThe mapped name. Alias=My Name
TagClass=?? COLSPAN=?? Align=??. Due to the new structure of being able to replace the entire header with GH1 and header=false. Tag use is not effective here. Selecting a new class will change the appearance of the cell.
FormulaThis optional parameter defines the calculated expression of the field. This parameter is required for sort, filtering and editing criteria. See following case study examples. Note that the formula field must provide the appropriate wrappers for alias fields of SQL, ORACLE etc..

QuickProp Keyword Abbreviation

nm

Remarks

The TextHolder - GH1 tag enables user to supply a fully customized header. Therefore the namemap feature in Tornado is effective mostly in assigning a formula to the calculated field.

Example

<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim E2 As New Tornado.z
With E2
   .dbQP = "U=2|M=Dh|S=Party|Ps=13|gdf=0,1,2|D=NWIND|Q=Orders|" & _
     Th=Ti=Debug Demo|de=Fields"
   .dbNameMap = "field=OrderID|alias=MyID, field=CustomerID|" & _
     "alisa=Customer,field=EmployeeID|alias=Employee"
   .ASPdbNET()
End With
End Sub
</script>
<script language="VB" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
  Dim E64 As New Tornado.Z()
    With E64
     .dbQP="U=60|S=11|D=NWIND"
     .dbNameMap = "field=3|Alias=Triple|Formula=CustomerID + CompanyName + CustomerID"
     .dbSQL = "SELECT CustomerID, CompanyName, ContactName, CustomerID + " & _
       "CompanyName + CustomerID as 'Dummy' FROM Customers"
     .dbTextHolder = "Title=Simple NameMap"
     .ASPdbNET()
    End With
End Sub
</script>

See Also

z Class | Tornado Namespace | dbFormNameMap | dbEmbeddedGridNameMap | Special Topic - NameMap