See Also

Enumerations

Name Values
This class exposes no enumerations.

Constants

Name Type Value
ModeMultiple Integer 1
ModeSingle Integer 0
SortAscending Integer 0
SortDescending Integer 1

Events

Definition Description
CellClick( theRow as Dictionary, theColumn as GraffitiGridColumn ) Fired when the user clicks a cell.
CellDoubleClick( theRow as Dictionary, theColumn as GraffitiGridColumn ) Fired when the user double-clicks a cell.
CellEdited( theRow as Dictionary, theColumn as GraffitiGridColumn, newValue as String ) Fires when the user submits an edit to a cell.
ColumnContextClick( Column as GraffitiGridColumn, X as Integer, Y as Integer ) Raised when the user right- or CTRL-clicks on a column header.
ColumnReorder( theColumn as GraffitiGridColumn, oldIndex as Integer, newIndex as Integer ) Fires when the user drags a column to a new position,
ColumnResize( theColumn as GraffitiGridColumn, newWidth as Integer ) Fires when the user resizes a column,
DrawCellBackground( theRow as Dictionary, theColumn as GraffitiGridColumn, g as Graphics ) as Boolean This event is raised before a cell's background is drawn, and provides the opportunity to override the class's behavior. Return True if you draw to the graphics property here.
DrawCellText( theRow as Dictionary, theColumn as GraffitiGridColumn, g as Graphics ) as Boolean This event is raised before a cell's text is drawn, and provides the opportunity to override the class's behavior. Return True if you draw to the graphics property here.
DrawHeaderBackground( theColumn as GraffitiGridColumn, g as Graphics ) This event is raised before a header's background is drawn, and provides the opportunity to override the class's behavior. Return True if you draw to the graphics property here.
DrawHeaderText( theColumn as GraffitiGridColumn, g as Graphics ) as Boolean This event is raised before a header's text is drawn, and provides the opportunity to override the class's behavior. Return True if you draw to the graphics property here.
FormatCellValue( g as Graphics, theRow as Dictionary, theColumn as GraffitiGridColumn, theValue as Variant, byRef formattedValue as String ) as Boolean This event allows you to change the look and content of the text that will be drawn to the cell.
HeaderClick( theColumn as GraffitiGridColumn ) as Boolean Raised when the user clicks a header. Return True to cancel built-in functionality.
MouseMove( X as Integer, Y as Integer, Row as Dictionary, Column as GraffitiGridColumn ) This event is raised when the mouse is moved.
RowClick( theRow as Dictionary ) Raised when the user clicks a row.
RowContextClick( Row as Dictionary, X as Integer, Y as Integer ) Raised when the user right- or CTRL-clicks on a row.
RowDrop( StartIndex as Integer, EndIndex as Integer ) Raised when the user moves a row in the display by dragging.
Scroll() Raised when the user scrolls the display.
Sorted( Column as GraffitiGridColumn ) Raised when the user sorts a column.

Methods

Definition Description
AddColumn( theColumn as GraffitiGridColumn ) Adds a column to the grid.
AddRow( theRow as Dictionary ) Adds a row to the grid.
DeselectAllRows() Deselect all currently selected rows.
DeselectRow( atIndex as Integer ) Deselect a specific row.
DeselectRow( theRow as Dictionary )
EditCell( theRow as Dictionary, theColumn as GraffitiGridColumn ) Begin editing of the specified row.
EditCell( theRow as Integer, theColumn as Integer )
GetColumnByID( theID as String ) as GraffitiGridColumn Search for a column with the ID of theID.
GetColumnIndex( theCol as GraffitiGridColumn ) as Integer Search for the column index of the supplied column.
GetColumnLeft( theCol as GraffitiGridColumn ) as Integer Get the X position of the supplied column.
GetColumnLeft( theIndex as Integer ) as Integer
GetColumnWidth( theCol as GraffitiGridColumn ) as Integer Get width of the supplied column.
GetColumnWidth( theIndex as Integer ) as Integer
GetRow( atIndex as Integer ) as Dictionary Retrieve the dictionary instance for the supplied row.
GetRowByTag( theTag as Variant ) as Dictionary Retrieve the dictionary instance that has a RowTag equal to theTag.
GetRowIndex( theRow as Dictionary ) as Integer Return the current index of the supplied row.
GetRowTop( theIndex as Integer ) as Integer Get the Y position of the specified row.
GetRowTop( theRow as Dictionary ) as Integer
InsertColumn( atIndex as Integer, theColumn as GraffitiGridColumn ) Inserts a new column at atIndex.
InsertRow( atIndex as Integer, theRow as Dictionary ) Inserts a new row at atIndex.
InvalidateAllRows() Force all rows to redrawn, regardless of their previous state.
InvalidateRow( atIndex as Integer ) Force the row at atIndex to be redrawn, regardless of previous state.
IsRowSelected( rowIndex as Integer ) as Boolean Returns True if the specified row is currently selected.
IsRowSelected( theRow as Dictionary ) as Boolean
RemoveAllRows() Removes all rows from the Grid.
RemoveColumn( atIndex as Integer ) Removes the specified column from the display.
RemoveColumn( theColumn as GraffitiGridColumn )
RemoveRow( atIndex as Integer ) Remove the specified row.
RemoveRow( theRow as Dictionary )
RowCount() Returns a count of all the rows in the Grid.
RowTag( theRow as Dictionary ) as Variant Retrieves the RowTag of the specified row.
RowTag( theRow as Integer ) as Variant
RowTag( theRow as Dictionary, Assigns newTag as Variant ) Sets the row tag of the specified row.
RowTag( theRow as Integer, Assigns newTag as Variant )
ScrollIntoView( theIndex as Integer ) Scrolls the specified row in to view.
ScrollIntoView( theRow as Dictionary )
ScrollTo( X as Integer, Y as Integer ) Scrolls the display to the specified position.
SelectAllRows() Select all rows.
SelectRow( atIndex as Integer ) Select the specified row.
SelectRow( theRow as Dictionary )
SortData( theCol as GraffitiGridColumn ) Causes the grid to re-sort the data in the provided column.
UpdateCell( theRow as Dictionary, theColumn as GraffitiGridColumn, newValue as Variant ) Update the cell value specified and redraw the row.
UpdateRows() Invalidate all rows, causing them to be redrawn.

Properties

Name Type Default Value Description
BackgroundColor Color &c000000 The color applied to the background of the entire grid.
Border Boolean False Draw a border around the grid.
BorderColor Color &c000000 The color of the border.
CellBorder Boolean False Border around cells.
ColumnResize Boolean False Allow user to resize columns.
CursorIndex Integer 0 Current position of navigation cursor within the grid, a row index.
CustomColors Boolean False Draw using custom color properties.
DragReorder Boolean False Allow user to reorder columns by dragging.
DragReorderRows Boolean False Allow user to reorder rows by dragging.
EditField TextField Nil Field used for editing operations.
GradientFills Boolean False When true, the grid will use subtle gradients instead of solid colors to draw components.
HeaderBorder Boolean False When true, draw a border around all column headers.
HeaderBorderColor Color &c000000 Border color for header.
HeaderDividerColor Color &c000000 Color of border between column headers.
HeaderDividerLineSize Integer 2 The width of the divider between column headers.
HeaderHeight Integer 30 The height of the header row.
HeaderHoverColor Color &c000000 The background color of the header when hovered.
HeaderHoverTextColor Color &c000000 The text color of the header when hovered.
HeaderTextBold Boolean False Font weight of the header text.
HeaderTextColor Color &c000000 Text color of the headers.
HeaderTextFont String “System” Font used to draw headers.
HeaderTextSize Integer 0 Font size of headers.
HeaderTextUnderline Boolean False Applies the underline text decoration.
LastDrawTime Double 0.0 How long, in seconds, the last redraw took.
LockUpdate Boolean False When true, the grid will not redraw while making changes. Set to false again to update display.
MinimumColumnWidth Integer 24 The smallest a column can be.
RowColor Color &c000000 Background color of even-numbered rows.
RowColorOdd Color &c000000 Background color of odd-numbered rows.
RowDividerColor Color &c000000 Color of the divider between rows.
RowDividerLineSize Integer 2 Height of the divider between rows.
RowHeight Integer 24 Height of rows.
RowHoverColor Color &c000000 Background color of rows when mouse is over them.
RowHoverTextColor Color &c000000 Foreground color of rows when mouse is over them.
RowSelectedColor Color &c000000 Background color of rows when selected.
RowSelectedTextColor Color &c000000 Foreground color of rows when selected.
RowTextBold Boolean False Font weight of rows.
RowTextColor Color &c000000 Text color of rows.
RowTextFont String “System” Font used to display row text.
RowTextItalic Boolean False Italicize row text.
RowTextSize Integer 0 Size to draw text.
RowTextUnderline Boolean False Text decoration.
ScrollbarHorizontal ScrollBar Nil The control to use as a scrollbar.
ScrollbarVertical ScrollBar Nil
ScrollPositionX Integer 0 Current horizontal scroll position.
ScrollPositionY Integer 0 Current vertical scroll position.
SelectedRows() Dictionary(Read-Only) Nil Updated when selection changes.
SelectionMode Integer ModeSingle Selection type, Single or Multiple, use constants.
SortIconColor Color &c000000 Color applied to the sort icon.
SortIconHoverColor Color &c000000 Color applied to the sort icon on mouse over.

Examples

There are currently no examples for this class.

  • Last modified: 8 months ago
  • by agcyphers