Programming Reference Manual
 
Syntax
 
HtmSelectInput(TableType, rs, KeyField, RedirectTo[, ControlName][, SearchFields][, InputClassName])
 
Description
Returns a fully formatted read-only table in html/javascript code for use in combination with the HtmParseFile method. You can choose in 3 different types of tables, and two styles:
List, lists only a table view in the specified style
Check, lists a table view, preceeded with an extra checkbox column. For checklist purposes, the checks can be read out with the HtmGetTableData function.
Edit, lists a table, where multiple columns can be edited. The EditFields variable holds the field names of these columns. Data can be read out with HtmGetTableData. NOTE: edit-type is just for lay-out purposes, editing is not supported.
 
Style1, a modern style table, build with proportional (sans serif) font.
Style2, a flat table, build with a fixed (monotype) font (courier.
 
All records and fields in the ADODB.recordset variable are used as a source with the field names as the parameters.
The rows, columns and values are automatically formatted, based on the field size and type and, ocassionally and when needed, also based on parts of the field names.
 
Parameter
Description
TableType
Specifies the type and style of the table, styles are:
    TabTypListStyle1 = 0
    TabTypListStyle2 = 1
    TabTypCheckStyle1 = 2
    TabTypCheckStyle2 = 3
    TabTypEditStyle1 = 4
    TabTypEditStyle2 = 5
rs
A reference to a previously opened ADODB.recordset variable.
KeyField
The unique identifier for the current recordset, often is [RowID] used.
NOTE: the Keyfield is NOT visible in the table.
RedirectTo
This is the (relative) url that is linked to, when a row in the list is selected. to embed the keyfield in the url, make sure that {0} is part of this parameter, which is replaced by the value of the keyfield.
ControlName
Optional, specifies the name of the created table. Use when multiple tables exists in a web form.
SearchFields
Optional, specifies an array variable, containing the column names where a filter can be applied to. Also creates an input field above the table.
InputClassName
Optional. Defines the mark-up of the searchfield input box.
 

Formatting columns

The formatting of the values is done automatically, based on the database-fieldtype and locale settings.
 
 
See Also
Example
 
Sub Main
 
Dim Temp$
 
   TrmSetInterface "HTML"
 
  SQL.RunRecordset "SELECT * FROM usr_vw_Loodslijst_Orders", rs
  Temp$ = HtmSelectInput(TabTypListStyle1, rs, "RowID", "menu_loodslijst.ccl?pagenum=edit&rowid={0}", , Array("OrderNr", "KlantNaam", "Omschrijving"), "blue-head")
  Temp$ = Replace$( Temp$, vbCrLf, "$$") ' - Regeleinden zijn field-separators in HtmParseFile, vervangen door 'double-dollars'
 
  HtmParseFile "tablet\menu_loodslijst.htm", "#SEARCHLIST#|" & sTemp
 
End Sub