Persits Software, Inc. Web Site
Main Menu:  Home |  Manual |  Object Reference |  FAQ |  Download & Buy |  Clients |  Live Demos |  Contact
 Navigator:  Home |  Object Reference |  Cell Object
Font Object Column Object
  Cell Object
The Cell object encapsulates the attributes of an individual <TD> or <TH> tag.

An instance of the Cell object can be obtained via the properties Column.Cell, Column.Header and Column.Footer.

Properties
Align
AltBGColor
BGColor
Class
Custom
Font
Height
InputMaxLength
InputSize
InputUserAttributes
NoWrap
VAlign
Width

Align As String (Read/Write)

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

Usage:
VBScript Grid("salary").Cell.Align = "RIGHT"
XML <Cols Index="salary">
 <Cell Align="RIGHT"/>
</Cols>
Relevant Chapters 3 and all others.

AltBGColor As String (Read/Write)
Specifies a value for the BGCOLOR attribute of <TD> tags for even rows. Use this property in tandem with BGColor to paint your grid rows with alternating colors.

Usage:
VBScript Grid.ColRange(2, 7).Cell.AltBGColor = "#FF0000"
XML <ColRange From="2" To="7">
 <Cell AltBGColor="#FF0000"/>
</ColRange>
Relevant Chapters 3 and all others.

BGColor As String (Read/Write)
Specifies a value for the BGCOLOR attribute of a <TD> or <TH> tag.

Usage:
VBScript Grid.ColRange(2, 7).Cell.BGColor = "#FFEE00"
XML <ColRange From="2" To="7">
 <Cell BGColor="#FFEE00"/>
</ColRange>
Relevant Chapters 3 and all others.

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

Usage:
VBScript Grid.Cols(3).Cell.Class = "myclass"
XML <Cols Index="3">
 <Cell Class="myclass"/>
</Cols>
Relevant Chapters 3 and all others.

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

Usage:
VBScript Grid.Cols(5).Header.Custom = "myattr=""myvalue"""
XML <Cols Index="5">
 <Header Custom="myattr=&quot;myvalue&quot;"/>
</Cols>
Relevant Chapters 3 and all others.

Font As Object (Read-only)
Returns the Font object associated with this cell. Font encapsulates the attributes of a <FONT> tag that surrounds a value inside the cell.

Usage:
VBScript Grid.Cols("name").Header.Font.Face = "Arial"
XML <Cols Index="5">
 <Header>
  <Font Face="Arial"/>
 </Header>
</Cols>
Relevant Chapters 3 and all others.

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

Usage:
VBScript Grid.Cols(3).Cell.Height = 6
XML <Cols Index="3">
 <Cell Height="6"/>
</Cols>
Relevant Chapters N/A

InputMaxLength As Integer (Read/Write)
Obsolete. In AspGrid 3.0 this property was moved to the Column object. Supported for backwards compatibility only. See Column.InputMaxLength.
InputSize As Integer (Read/Write)
Obsolete. In AspGrid 3.0 this property was moved to the Column object. Supported for backwards compatibility only. See Column.InputSize.
InputUserAttributes As String (Read/Write)
Obsolete. In AspGrid 3.0 this property was moved to the Column object. Supported for backwards compatibility only. See Column.InputUserAttributes.
NoWrap As Boolean (Read/Write)
False by default. If set to True, adds a NOWRAP attribute to a <TD> or <TH> tag.

Usage:
VBScript Grid.Cols(3).Header.NoWrap = True
XML <Cols Index="3">
 <Header NoWrap="True"/>
</Cols>
Relevant Chapters N/A

VAlign As String (Read/Write)
Specifies a value for the VALIGN attribute of a <TD> or <TH> tag. Possible values are "TOP", "CENTER" and "BOTTOM".

Usage:
VBScript Grid.Cols(3).Cell.VALIGN = "TOP"
XML <Cols Index="3">
 <Cell VAlign="TOP"/>
</Cols>
Relevant Chapters N/A

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

Usage:
VBScript Grid("salary").Header.Width = "200"
XML <Cols Index="salary">
 <Header Width="200"/>
</Cols>
Relevant Chapters 3 and all others.

Column Object Font Object

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