Persits Software, Inc. Web Site
Main Menu:  Home |  Manual |  Object Reference |  FAQ |  Download & Buy |  Clients |  Live Demos |  Contact
 Navigator:  Home |  Object Reference |  Table Object
Caption Object Font Object
  Table Object
The Table object encapsulates the attributes of a grid's <TABLE> tag.

An instance of the Table object can be obtained via the property Grid.Table.

Properties
Align
BGColor
Border
Caption
CellPadding
CellSpacing
Class
Custom
Height
Width

Align As String (Read/Write)

Specifies a value for the ALIGN attribute of the <TABLE> tag. Possible values are "LEFT", "CENTER" and "RIGHT".

Usage:
VBScript Grid.Table.Align = "RIGHT"
XML <Grid>...
 <Table Align="RIGHT"/>
</Grid>
Relevant Chapters 3 and all others.

BGColor As String (Read/Write)
Specifies a value for the BGColor attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.BGColor = "#EEEEEE"
XML <Grid>...
 <Table BGColor="#EEEEEE"/>
</Grid>
Relevant Chapters 3 and all others.

Border As String (Read/Write)
"1" by default. Specifies a value for the BORDER attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.Border = "3"
XML <Grid>...
 <Table Border="3"/>
</Grid>
Relevant Chapters 3 and all others.

Caption As Object (Read-only)
Returns the Caption object that represents a <CAPTION> tag that may immediately follow the <TABLE> tag. Use this object to set your grid's title.

Although Caption is a read-only property, a direct assignment such as

Grid.Table.Caption = "Employees"

is acceptable as the Caption object exposes a default Value property.

When set via XML, the tag <TableCaption> must be used, not <Caption>, because the latter is being used as a sub-element of the <Column> element.

Usage:
VBScript Grid.Table.Caption = "Employees"
Grid.Table.Caption.Font.Face = "Arial"
XML <Grid>...
 <Table>
  <TableCaption Value="Employees">
   <Font Face="Arial"/>
  </TableCaption>
 </Table>
</Grid>
Relevant Chapters 3 and all others.

CellPadding As Integer (Read/Write)
Specifies a value for the CELLPADDING attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.CellPadding = 0
XML <Grid>...
 <Table CellPadding="0"/>
</Grid>
Relevant Chapters 3 and all others.

CellSpacing As Integer (Read/Write)
Specifies a value for the CELLSPACING attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.CellPadding = 2
XML <Grid>...
 <Table CellSpacing="20"/>
</Grid>
Relevant Chapters 3 and all others.

Class As String (Read/Write)
Specifies a value for the CLASS attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.Class = "myclass"
XML <Grid>...
 <Table Class="myclass"/>
</Grid>
Relevant Chapters N/A

Custom As String (Read/Write)
Specifies a custom attribute and its value for the <TABLE> tag.

Usage:
VBScript Grid.Table.Custom = "myattr=""myvalue"""
XML <Grid>
 <Table Custom="myattr=&quot;myvalue&quot;"/>
</Grid>
Relevant Chapters 3 and all others.

Height As String (Read/Write)
Specifies a value for the HEIGHT attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.Height = "200"
XML <Grid>...
 <Table Height="200"/>
</Grid>
Relevant Chapters N/A

Width As String (Read/Write)
Specifies a value for the WIDTH attribute of the <TABLE> tag.

Usage:
VBScript Grid.Table.Width = "100%"
XML <Grid>...
 <Table Width="100%"/>
</Grid>
Relevant Chapters 3 and all others.

Font Object Caption Object

Search AspGrid.com
  This site is owned and maintained by Persits Software, Inc. Copyright © 2000 - 2010. All Rights Reserved.