Visual InterDev
See Also Tasks Properties Methods
Creates a grid object at design time that generates the appropriate HTML for a data-bound grid at run time.
Remarks
Use the Grid control to create a data-bound table. The settings on the Data tab of the Grid Properties dialog box allow you to choose the record source and columns to output. The other tabs in the Grid Properties dialog box allow you to format the look of the table.
Note To use data binding with the Grid control, you must have a Recordset control on a the page to bind to.
Rules for expressions
The Field/Expression property on the Data tab of the Grid Properties dialog box supports expressions. A string that begins with an equal sign ( = ) indicates that it is an expression. An expression can be built from any combination of strings, fields, and functions in order to produce a string that will be written to the page.
[ ]
are placed around a field name to return the field's value.
The following example combines HTML formatting and a field named First Name
.
="<B><I>" + [First Name] + "</B></I>"
If the value of First Name
in the current record is "Shiniqua", the expression would produce the following on the client browser:
Shiniqua
Another example is to use a field to create a link:
= "<A mailto:" + [Email] + ">" + [Email] + "</A>"
Scripting Notes
Call the hide, show, and isVisible methods to control how the Grid is displayed. To manipulate the navigation controls of the Grid, call the getPagingNavbar and getRecordsetNavbar methods. To show all the columns in the Grid you can call the bindAllColumns method. There are no events or properties associated with the Grid script object.
Note For additional information about using the Grid design-time control, refer to the white paper What is the Grid Design-Time Control? on the MSDN Web site.