Introduction
 Top Next

The DataGrid plugin is an object plugin for AutoPlay Media Studio 5.0 Professional Edition. You can find out more about AutoPlay Media Studio at:

http://www.indigorose.com

The DataGrid plugin was created and is supported by Icy North Technologies. See http://www.icynorth.com on the Web.

All questions and comments about this plugin can be posted at the Icy North Technologies forums: http://www.icynorth.com/forums .


Properties Dialog
 Previous Top Next

Rows
The number of rows initially in the grid.

Columns
The number of columns initially in the grid.

Fixed Rows
The number of fixed rows initially in the grid.

Fixed Columns
The number of fixed columns initially in the grid.


On Cell Changed

The On Cell Changed event is fired whenever the text of a cell changes for any reason. This may result from the user editing cell text or from text being pasted in or even from the text changing in response to an action such as DataGrid.SetCellText.

The following events are passed to this event:

number Row, number Column, string OldText, string NewText

Row
The row (0-based) of the cell that changed.

Column
The column (0-based) of the cell that changed.

Old Text
The text that was in the cell before it was changed.

NewText
The new text of the cell.


On Selection Changed

The On Selection Changed event is fired whenever the selection of cells in the grid changes.

The following events are passed to this event:

number Row, number Column

Row
The row (0-based) of the cell that now has focus.

Column
The column (0-based) of the cell that now has focus.


DataGrid.AutoSize

DataGrid.AutoSize(string ObjectName, number ResizeMode = GVS_DEFAULT, boolean Redraw = true)

Description

Automatically sizes all rows and columns.

Arguments

ObjectName
(string) The name of the object.

ResizeMode
(number) The auto resize mode. Choose from:

GVS_DEFAULT - Use the default behavior which is to make all rows and columns as small as they can be while still accommodating all of their text. GVS_HEADER - Make all rows and columns resize according to the size of the largest text in the header row or column.
GVS_DATA - Make all rows and columns resize according to the size of the largest text in any cell of the row or column.
GVS_BOTH - Mixes both GVS_HEADER and GVS_DATA using whichever is the largest in the row or column.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.AutoSizeColumn

DataGrid.AutoSizeColumn(string ObjectName, number Column, number ResizeMode = GVS_DEFAULT, boolean ResetScroll = true, boolean Redraw = true)

Description

Automatically sizes a single column.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The column (0-based) to autosize.

ResetScroll
(boolean) Whether the scrollbars should be reset. This is an optional argument. If omitted it will default to true.

ResizeMode
(number) The auto resize mode. Choose from:

GVS_DEFAULT - Use the default behavior which is to make the column as small as it can be while still accommodating all of its text.
GVS_HEADER - Make the column resize according to the size of the text in the header cell.
GVS_DATA - Make the column resize to the widest non-header cell in the column.
GVS_BOTH - Mixes both GVS_HEADER and GVS_DATA using whichever is the widest in the column.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.AutoSizeColumns

DataGrid.AutoSizeColumns(string ObjectName, number ResizeMode = GVS_DEFAULT, boolean Redraw = true)

Description

Automatically sizes all columns in the grid.

Arguments

ObjectName
(string) The name of the object.

ResizeMode
(number) The auto resize mode. Choose from:

GVS_DEFAULT - Use the default behavior which is to make each column as small as it can be while still accommodating all of its text.
GVS_HEADER - Make each column resize according to the size of the text in the header cell.
GVS_DATA - Make each column resize to the widest non-header cell in the column.
GVS_BOTH - Mixes both GVS_HEADER and GVS_DATA using whichever is the widest in each column.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.AutoSizeRow

DataGrid.AutoSizeRow(string ObjectName, number Row, boolean ResetScroll = true, boolean Redraw = true)

Description

Automatically sizes a single row.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The row (0-based) to autosize.

ResetScroll
(boolean) Whether the scrollbars should be reset. This is an optional argument. If omitted it will default to true.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.AutoSizeRows

DataGrid.AutoSizeRows(string ObjectName, boolean Redraw = true)

Description

Automatically sizes all rows in the grid.

Arguments

ObjectName
(string) The name of the object.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.DeleteAllItems

DataGrid.DeleteAllItems(string ObjectName)

Description

Deletes all cells from the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.DeleteColumn

DataGrid.DeleteColumn(string ObjectName, number Column, boolean Redraw = true)

Description

Deletes a column from the grid.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The (zero-based) index of the column to delete.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.DeleteNonFixedRows

DataGrid.DeleteNonFixedRows(string ObjectName, boolean Redraw = true)

Description

Deletes all non-fixed rows from the grid.

Arguments

ObjectName
(string) The name of the object.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.DeleteRow

DataGrid.DeleteRow(string ObjectName, number Row, boolean Redraw = true)

Description

Deletes a row from the grid.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row to delete.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.EditCopy

DataGrid.EditCopy(string ObjectName)

Description

Copies the currently selected cells to the clipboard. This action is mapped to the Ctrl+C keystroke. Cells are copies in plain text, tab-delimited format. This allows the text to be pasted easily into a text editor or a spreadsheet program like Excel.

Arguments

ObjectName
(string) The name of the object.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.EditCut

DataGrid.EditCut(string ObjectName)

Description

Cuts the currently selected cells to the clipboard. This deletes the cell's contents. This action is mapped to the Ctrl+X keystroke. Cells are copies in plain text, tab-delimited format. This allows the text to be pasted easily into a text editor or a spreadsheet program like Excel.

Arguments

ObjectName
(string) The name of the object.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.EditPaste

DataGrid.EditPaste(string ObjectName)

Description

Pastes the contents of the clipboard to the grid (if the date format on the clipboard is compatible.) This action is mapped to the Ctrl+V keystroke.

Arguments

ObjectName
(string) The name of the object.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.EnsureVisible

DataGrid.EnsureVisible(string ObjectName, number Row = 0, number Column = 0)

Description

Ensures that the specified cell is visible. It will scroll the specified cell into view if necessary.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row.

Column
(number) The (zero-based) index of the column.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.ExpandColumnsToFit

DataGrid.ExpandColumnsToFit(string ObjectName, boolean ExpandFixed = true, boolean Redraw = true)

Description

Expands (or reduces) all columns to fit into the grid window area.

Arguments

ObjectName
(string) The name of the object.

ExpandFixed
(boolean) Whether the fixed columns are expanded. This is an optional argument. If omitted it will default to true.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.ExpandLastColumn

DataGrid.ExpandLastColumn(string ObjectName, boolean Redraw = true)

Description

Expands (or reduces) the last (right-most) column to fill the grid window area.

Arguments

ObjectName
(string) The name of the object.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.ExpandRowsToFit

DataGrid.ExpandRowsToFit(string ObjectName, boolean ExpandFixed = true, boolean Redraw = true)

Description

Expands (or reduces) all rows to fit into the grid window area.

Arguments

ObjectName
(string) The name of the object.

ExpandFixed
(boolean) Whether the fixed rows are expanded.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.ExpandToFit

DataGrid.ExpandToFit(string ObjectName, boolean ExpandFixed = true, boolean Redraw = true)

Description

Expands (or reduces) all rows and columns to fit into the grid window area.

Arguments

ObjectName
(string) The name of the object.

ExpandFixed
(boolean) Whether the fixed rows and columns are expanded.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.GetCellColors

table DataGrid.GetCellColors(string ObjectName, table Row, table Column)

Description

Gets the background and text colors of a cell as a table with indexes Background and Text.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row.

Column
(number) The (zero-based) index of the column.

Returns

A table if successful or nil if the action fails. The table returned has the indexes:

Background - (number) The color value of the cell's background. If this value is GRID_CLR_DEFAULT then the cell is set to the default color for cells according to the user's Windows color scheme.

Text - (number) The color value of the cell's text. If this value is GRID_CLR_DEFAULT then the cell is set to the default color for cells according to the user's Windows color scheme.

Call Application.GetLastError to find out if an error occurred.

Example

-- Display cell colors for cell 1, 1
tbColors = DataGrid.GetCellColors("DataGrid",1,1);
if tbColors then
     if tbColors.Background == GRID_CLR_DEFAULT then
      BackgroundColor = "DEFAULT";
     else
      BackgroundColor = tbColors.Background;
     end
     if tbColors.Text == GRID_CLR_DEFAULT then
      TextColor = "DEFAULT";
     else
      TextColor = tbColors.Text;
     end
     Message = "Background = "..BackgroundColor..", Text = "..TextColor;
     Dialog.Message("Colors",Message);
end


DataGrid.GetCellText

string DataGrid.GetCellText(string ObjectName, number Row, number Col)

Description

Gets the text of a cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row.

Column
(number) The (zero-based) index of the column.

Returns

The text of the specified cell.


DataGrid.GetColumnCount

number DataGrid.GetColumnCount(string ObjectName)

Description

Gets the number of columns in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

The number of columns.


DataGrid.GetColumnHiding

boolean DataGrid.GetColumnHiding(string ObjectName)

Description

Gets whether or not columns can be contracted to 0 width via the mouse.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not columns can be hidden by the user. Returns true or false.


DataGrid.GetColumnResize

boolean DataGrid.GetColumnResize(string ObjectName)

Description

Gets whether or not columns can be resized by the user.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not columns can be resized by the user. Returns true or false.


DataGrid.GetColumnWidth

number DataGrid.GetColumnWidth(string ObjectName, number Column)

Description

Gets the width in pixels of a column.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The (zero-based) index of the column.

Returns

The width of the specified column in pixels.


DataGrid.GetDragAndDrop

boolean DataGrid.GetDragAndDrop(string ObjectName)

Description

Gets whether cells can be dragged and dropped by the user.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether cells can be dragged and dropped. Returns true or false.


DataGrid.GetEditable

boolean DataGrid.GetEditable(string ObjectName)

Description

Gets whether the grid is editable by the user.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether the grid is editable. Returns true or false.


DataGrid.GetFixedColumnCount

number DataGrid.GetFixedColumnCount(string ObjectName)

Description

Gets the number of fixed columns in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

The number of fixed columns.


DataGrid.GetFixedColumnSelection

boolean DataGrid.GetFixedColumnSelection(string ObjectName)

Description

Gets whether or not clicking on a fixed column selects the cells underneath it.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not clicking on a fixed column selects the cells underneath it. Returns true or false.


DataGrid.GetFixedRowCount

number DataGrid.GetFixedRowCount(string ObjectName)

Description

Gets the number of fixed rows in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

The number of fixed rows.


DataGrid.GetFixedRowSelection

boolean DataGrid.GetFixedRowSelection(string ObjectName)

Description

Gets whether or not clicking on a fixed row selects the cells beside it.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not clicking on a fixed row selects the cells beside it. Returns true or false.


DataGrid.GetFocusCell

table DataGrid.GetFocusCell(string ObjectName)

Description

Gets a table that contains the row and column index of the cell the currently has the input focus.

Arguments

ObjectName
(string) The name of the object.

Returns

A table if successful for nil if it fails. Call Application.GetLastError for additional error details. The table that is returned contains the indexes:

Row - The (zero-based) index of the row.

Column - The (zero-based) index of the column.

If no cell currently has focus, then Row and Column are both returned as -1.


DataGrid.GetFrameFocusCell

boolean DataGrid.GetFrameFocusCell(string ObjectName)

Description

Gets whether or not the focus cell is highlighted with a framed border.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not the focus cell is highlighted with a framed border. Returns true or false.


DataGrid.GetHeaderSort

boolean DataGrid.GetHeaderSort(string ObjectName)

Description

Gets whether or not rows are sorted on column header clicks when in list mode .

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not rows are sorted on column header clicks. Returns true or false.


DataGrid.GetGridColors

table DataGrid.GetGridColors(string ObjectName)

Description

Gets the background, grid line, and tooltip colors of the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

A table if successful or nil if the action fails. The table returned has the indexes:

GridBackground - (number) The color value of the grid's background. If this value is GRID_CLR_DEFAULT then the grid is set to the default color according to the user's Windows color scheme.

GridLines - (number) The color value of the grid's lines. If this value is GRID_CLR_DEFAULT then the grid lines are set to the default color according to the user's Windows color scheme.

TooltipBackground - (number) The color value of the grid tooltip's background. If this value is GRID_CLR_DEFAULT then the tooltip background is set to the default color according to the user's Windows color scheme.

TooltipText - (number) The color value of the grid tooltip's text. If this value is GRID_CLR_DEFAULT then the tooltip text is set to the default color according to the user's Windows color scheme.

Call Application.GetLastError to find out if an error occurred.


DataGrid.GetGridLines

number DataGrid.GetGridLines(string ObjectName)

Description

Gets whether the grid lines are displayed.

Arguments

ObjectName
(string) The name of the object.

Returns

A number that tells you which gridlines are displayed in the grid. It will be one of the following values:

GVL_NONE - None (numeric value is 0)

GVL_HORZ - Horizontal lines (numeric value is 1)

GVL_VERT - Vertical lines (numeric value is 2)

GVL_BOTH - Both (numeric value is 3)


DataGrid.GetListMode

boolean DataGrid.GetListMode(string ObjectName)

Description

Gets whether the grid is in list mode. When the grid is in list mode, full row selection is enabled and clicking on the column header will can sort the grid by rows according to the DataGrid.GetHeaderSort value.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether the grid is in list mode. Returns true or false.


DataGrid.GetModified

boolean DataGrid.GetModified(string ObjectName, number Row = -1, number Column = -1)

Description

Gets the modified flag for a cell, or if -1, -1 is passed in for row and column, it returns the status for the entire grid. That is, whether the cell or grid has been modified since it was created or the last call to DataGrid.SetModified .

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row. Pass -1 for row and column to get the modified value of the whole grid.

Column
(number) The (zero-based) index of the column. Pass -1 for row and column to get the modified value of the whole grid.

Returns

Whether the cell or grid has been modified. Returns true or false.


DataGrid.GetNextItem

table DataGrid.GetNextItem(string ObjectName, number Row = 0, number Column = 0, number SearchType, number SearchDirection)

Description

Searches for a cell that has the specified properties and that bears the specified relationship to a given item.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row to start searching at.

Column
(number) The (zero-based) index of the column to start searching at.

SearchType
(number) The search type. Choose one of:

GVNI_FOCUSED - search for focus cell
GVNI_SELECTED - search for selected cell
GVNI_DROPHILITED - search for drop hilighted cells
GVNI_READONLY - search for read-only cells
GVNI_FIXED - search for fixed cells
GVNI_MODIFIED - search for modified cells

SearchDirection
(number) The direction of the search relative to the specified row and column. Chose one of:

GVNI_ABOVE - search above intial cell
GVNI_ALL - search all cells in the grid starting from the intial cell
GVNI_AREA - search all cells below and to the right of the intial cell
GVNI_BELOW - search all cells below initial cell
GVNI_TOLEFT - search all cells to the left of the initial cell
GVNI_TORIGHT - search all cells to the right of the intial cell

Returns

A table if successful or nil if the search did not find a match. If a table is returned it has the indexes "Row" and "Column" to specify the found cell's location.


DataGrid.GetRowCount

number DataGrid.GetRowCount(string ObjectName)

Description

Gets the number of rows in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

The number of rows


DataGrid.GetRowHeight

number DataGrid.GetRowHeight(string ObjectName, number Row)

Description

Gets the height in pixels of a row.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row.

Returns

The height of the specified row in pixels.


DataGrid.GetRowHiding

boolean DataGrid.GetRowHiding(string ObjectName)

Description

Gets whether or not rows can be contracted to 0 height via the mouse.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not rows can be hidden by the user. Returns true or false.


DataGrid.GetRowResize

boolean DataGrid.GetRowResize(string ObjectName)

Description

Gets whether or not rows can be resized by the user.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not rows can be resized by the user. Returns true or false.


DataGrid.GetSelectable

boolean DataGrid.GetSelectable(string ObjectName)

Description

Gets whether or not the user can select grid cells with the mouse or keyboard.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not the user can select grid cells . Returns true or false.


DataGrid.GetSelectedCount

number DataGrid.GetSelectedCount(string ObjectName)

Description

Gets the number of cells that are currently selected in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

The number of cells that are currently selected in the grid.


DataGrid.GetSingleColumnSelection

boolean DataGrid.GetSingleColumnSelection(string ObjectName)

Description

Get whether or not the grid is in single column selection mode.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not the grid is in single column selection mode. Returns true or false.


DataGrid.GetSingleRowSelection

boolean DataGrid.GetSingleRowSelection(string ObjectName)

Description
Get whether or not the grid is in single row selection mode.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not the grid is in single row selection mode. Returns true or false.


DataGrid.GetSortAscending

boolean DataGrid.GetSortAscending(string ObjectName)

Description

Gets whether the current sort column is sorted ascending.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether the current sort column is sorted ascending. Returns true or false.


DataGrid.GetSortColumn

number DataGrid.GetSortColumn(string ObjectName)

Description

Gets the index of the currently sorted column in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

The (zero-based) index of the currently sorted column in the grid.


DataGrid.GetTabEnabled

boolean DataGrid.GetTabEnabled(string ObjectName)

Description

Gets whether or not the Tab key is used to move the cell selection.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether the Tab key is used to move the cell selection. Returns true or false.


DataGrid.GetToolTipsEnabled

boolean DataGrid.GetToolTipsEnabled(string ObjectName)

Description

Gets whether or not tooltips will be displayed for cells that cannot contain all of their text.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether tooltips are enabled. Returns true or false.


DataGrid.GetTrackFocusCell

boolean DataGrid.GetTrackFocusCell(string ObjectName)

Description

Gets whether or not the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border. Returns true or false.


DataGrid.GetUnhideColumn

boolean DataGrid.GetUnhideColumn(string ObjectName)

Description

Gets whether or not 0 width columns can be resized by the user via mouse.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not columns can be un-hidden. Returns true or false.


DataGrid.GetUnhideRow

boolean DataGrid.GetUnhideRow(string ObjectName)

Description

Gets whether or not 0 height rows can be resized by the user via mouse.

Arguments

ObjectName
(string) The name of the object.

Returns

Whether or not rows can be un-hidden. Returns true or false.


DataGrid.InsertColumn

number DataGrid.InsertColumn(string ObjectName, number InsertPosition, boolean Redraw = true)

Description

Inserts a column into the grid. Returns the index of the inserted column.

Arguments

ObjectName
(string) The name of the object.

InsertPosition
(number) The zero-based position where the column should be inserted. Use -1 to add a column as the last column.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

The zero-based index of the newly inserted column.


DataGrid.InsertRow

number DataGrid.InsertRow(string ObjectName, number InsertPosition, boolean Redraw = true)

Description

Inserts a row into the grid. Returns the index of the inserted row.

Arguments

ObjectName
(string) The name of the object.

InsertPosition
(number) The zero-based position where the row should be inserted. Use -1 to add a row as the last row.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

The zero-based index of the newly inserted row.


DataGrid.IsCellEditable

boolean DataGrid.IsCellEditable(string ObjectName, number Row, number Column)

Description

Gets whether or not a specified cell is editable.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Whether the specifed cell is editable. Returns true or false.


DataGrid.IsCellFixed

boolean DataGrid.IsCellFixed(string ObjectName, number Row, number Column)

Description

Gets whether or not a specified cell is a fixed cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Whether the specifed cell is a fixed cell. Returns true or false.


DataGrid.IsCellSelected

boolean DataGrid.IsCellSelected(string ObjectName, number Row, number Column)

Description

Gets whether or not a specified cell is selected.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Whether the specifed cell is selected. Returns true or false.


DataGrid.IsCellValid

boolean DataGrid.IsCellValid(string ObjectName, number Row, number Column)

Description

Gets whether or not a specified cell is valid. That is whether or not the cell at the row and column exists. This is a useful way to test for a cell's validity before calling other actions that affect the cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Whether the specifed cell is valid. Returns true or false.


DataGrid.IsCellVisible

boolean DataGrid.IsCellVisible(string ObjectName, number Row, number Column)

Description

Gets whether or not a specified cell is visible in the grid window.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Whether the specifed cell is visible. Returns true or false.


DataGrid.MakeColorRGB

number DataGrid.MakeColorRGB(number Red, number Green, number Blue)

Description

Makes a color value from reg, green and blue components. This is a helper function provided as a convenience. It does not directly affect the data grid.

Arguments

Red
(number) The red component (0-255).

Green
(number) The green component (0-255).

Blue
(number) The blue component (0-255).

Returns

A number that can be used as color value for actions that use colors.

Example

-- Make blue:
blue = DataGrid.MakeColorRGB(0,0,255);
-- Make white:
blue = DataGrid.MakeColorRGB(255,255,255);
-- Make black:
blue = DataGrid.MakeColorRGB(0,0,0);
-- Make grey:
blue = DataGrid.MakeColorRGB(192,192,192);


DataGrid.Print

DataGrid.Print(string ObjectName, boolean WYSIWYG = false, boolean ShadedPrintOut = true, table MarginInfo = nil)

Description

Prints the contents of the grid.

Arguments

ObjectName
(string) The name of the object.

WYSIWYG
(boolean) Whether to print in WYSIWYG mode (true) or size-to-width mode (false). This is an optional argument. If omitted it will default to false.

ShadedPrintOut
(boolean) Whether or not to print with shaded cells. This is an optional argument. If omitted it will default to true.

MarginInfo
(table) A table of margin information for the print. Pass nil to use the default margin settings. This is an optional argument. If omitted it will default to nil. All values are optional. If omitted, the default will be used. All values are numbers and are in character units. That is the average size of a character in the DataGrid.

This table supports the following indexes:

HeaderHeight
FooterHeight
LeftMargin
RightMargin
TopMargin
BottomMargin
Gap

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.RedrawCell

DataGrid.RedrawCell(string ObjectName, number Row, number Column)

Description

Refreshes (redraws) a specified cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.RedrawColumn

DataGrid.RedrawColumn(string ObjectName, number Column)

Description

Refreshes (redraws) a specified column in the grid.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The zero-based index of the column.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.RedrawRow

DataGrid.RedrawRow(string ObjectName, number Row)

Description

Refreshes (redraws) a specified row in the grid.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the row.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.Refresh

DataGrid.Refresh(string ObjectName)

Description

Refreshes (redraws) the entire data grid and its contents.

Arguments

ObjectName
(string) The name of the object.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SelectAll

DataGrid.SelectAll(string ObjectName)

Description

Selects all non-fixed cells in the grid.

Arguments

ObjectName
(string) The name of the object.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetCellColors

DataGrid.SetCellColors(string ObjectName, number Row, number Column, table Colors, boolean Redraw = true)

Description

Sets the background, and text colors of a cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Colors
(table) A table of numerical color values. Indexes (all optional) are Background and Text. Use GRID_CLR_DEFAULT to set the color back to the default system color for a cell. You can use the DataGrid.MakeColorRGB action to help make colors.

Redraw
(boolean) Whether the cell should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.

Example

-- Change cell colors for cell 1, 1
-- Make the background white and the text black
tbColors = {Background=16777215,Text=0};
DataGrid.SetCellColors("DataGrid",1,1,tbColors);


DataGrid.SetCellFont

DataGrid.SetCellFont(string ObjectName, number Row, number Column, table FontData = nil, boolean Redraw = true)

Description

Sets the font of a cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

FontData
A table of font informatition. Pass nil to use the default grid font. This is an optional argument. If omitted it will default to nil. All values are optional. If omitted, the default will be used.

This table supports the following indexes:

FaceName (string) - The face name such as "Arial" or "Verdana".
Height (number) - The font height in points.
Weight (number) - The font weight. Commonly used values are:

0 - Doesn't matter
100 - Thin
200 - Extra Light
300 - Light
400 - Normal
500 - Medium
600 - Semi-Bold
700 - Bold
800 - Extra Bold
900 - Heavy

Italic (boolean) - Whether the font is italicized.
Underline (boolean) - Whether the font is underlined.

Redraw
(boolean) Whether the cell should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetCellText

DataGrid.SetCellText(string ObjectName, number Row, number Column, string Text, boolean Redraw = true)

Description

Sets the text of a cell.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the cell's row.

Column
(number) The (zero-based) index of the cell's column.

Text
(string) The cell's new text.

Redraw
(boolean) Whether the cell should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.

Example

-- Change cell text for cell 10, 23
DataGrid.SetCellText("DataGrid",10,23,"Hello, world.");


DataGrid.SetColumnCount

DataGrid.SetColumnCount(string ObjectName, number ColumnCount)

Description

Sets the number of columns in the grid. If there are more than ColumnCount columns in the grid already the extra columns will be removed.

Arguments

ObjectName
(string) The name of the object.

ColumnCount
(number) The number of columns that should be in the grid.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetColumnHiding

DataGrid.SetColumnHiding(string ObjectName, boolean AllowHiding = true)

Description

Sets whether or columns can be contracted to 0 width by the user with the mouse.

Arguments

ObjectName
(string) The name of the object.

AllowHiding
(boolean) Whether columns can be hidden. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetColumnResize

DataGrid.SetColumnResize(string ObjectName, boolean Resizable = true)

Description

Sets whether or columns are resizable by the user. Columns are always resizable from actions such as DataGrid.SetColumnWidth .

Arguments

ObjectName
(string) The name of the object.

Resizable
(boolean) Whether columns can be resized. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetColumnWidth

DataGrid.SetColumnWidth(string ObjectName, number Column, number Width, boolean Redraw = true)

Description

Sets the width of a column in pixels.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The (zero-based) index of the column.

Width
(number) The width of the column in pixels.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetDragAndDrop

DataGrid.SetDragAndDrop(string ObjectName, boolean Enable = true)

Description

Sets whether cells can be dragged and dropped by the user.

Arguments

ObjectName
(string) The name of the object.

Enable
(boolean) Whether drag and drop is enabled. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetEditable

DataGrid.SetEditable(string ObjectName, boolean Editable)

Description

Sets whether the grid is editable by the user.

Arguments

ObjectName
(string) The name of the object.

Editable
(boolean) Whether or not the grid is editable.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetFixedColumnCount

DataGrid.SetFixedColumnCount(string ObjectName, number ColumnCount)

Description

Sets the number of fixed columns in the grid.

Arguments

ObjectName
(string) The name of the object.

ColumnCount
(number) The new fixed column count.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetFixedColumnSelection

DataGrid.SetFixedColumnSelection(string ObjectName, boolean Enable)

Description

Sets whether or not clicking on a fixed column selects the cells underneath it.

Arguments

ObjectName
(string) The name of the object.

Enable
(boolean) Whether or not fixed column selecting is turned on.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetFixedRowCount

DataGrid.SetFixedRowCount(string ObjectName, number RowCount)

Description

Sets the number of fixed rows in the grid.

Arguments

ObjectName
(string) The name of the object.

RowCount
(number) The new fixed row count.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetFixedRowSelection

DataGrid.SetFixedRowSelection(string ObjectName, boolean Enable)

Description

Sets whether or not clicking on a fixed row selects the cells beside it.

Arguments

ObjectName
(string) The name of the object.

Enable
(boolean) Whether or not fixed row selecting is turned on.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetFocusCell

DataGrid.SetFocusCell(string ObjectName, number Row, number Column)

Description

Sets the input focus to a cell at a specified row and column index.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The zero-based index of the cell's row.

Column
(number) The zero-based index of the cell's column.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetFrameFocusCell

DataGrid.SetFrameFocusCell(string ObjectName, boolean Enable, boolean Redraw = true)

Description

Sets whether or not the focus cell is highlighted with a framed border.

Arguments

ObjectName
(string) The name of the object.

Enable
(boolean) Whether framing of the focus cell is enabled or not.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetGridColors

DataGrid.SetGridColors(string ObjectName, table Colors)

Description

Gets the background, grid line, and tooltip colors of the grid.

Arguments

ObjectName
(string) The name of the object.

Colors
(table) A table with the following indexes:

GridBackground - (number) The color value of the grid's background. If this value is GRID_CLR_DEFAULT then the grid is set to the default color according to the user's Windows color scheme. You can use the DataGrid.MakeColorRGB action to help make colors.

GridLines - (number) The color value of the grid's lines. If this value is GRID_CLR_DEFAULT then the grid lines are set to the default color according to the user's Windows color scheme.

TooltipBackground - (number) The color value of the grid tooltip's background. If this value is GRID_CLR_DEFAULT then the tooltip background is set to the default color according to the user's Windows color scheme.

TooltipText - (number) The color value of the grid tooltip's text. If this value is GRID_CLR_DEFAULT then the tooltip text is set to the default color according to the user's Windows color scheme.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetGridLines

DataGrid.SetGridLines(string ObjectName, boolean Horizontal, boolean Vertical)

Description

Sets whether the grid lines are displayed.

Arguments

ObjectName
(string) The name of the object.

Horizontal
(boolean) Whether horizontal grid lines should be displayed.

Vertical
(boolean) Whether vertical grid lines should be displayed.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetHeaderSort

DataGrid.SetHeaderSort(string ObjectName, boolean SortOnClick)

Description

Sets whether or not rows are sorted on column header clicks when in list mode.

Arguments

ObjectName
(string) The name of the object.

SortOnClick
(boolean) Whether or not clicking a column header sorts the rows below it.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetListMode

DataGrid.SetListMode(string ObjectName, boolean ListMode)

Description

Sets whether the grid is in list mode. When the grid is in list mode, full row selection is enabled and clicking on the column header will can sort the grid by rows according to the DataGrid.GetHeaderSort value.

Arguments

ObjectName
(string) The name of the object.

ListMode
(boolean) Whether the grid should be in list mode.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetModified

DataGrid.SetModified(string ObjectName, boolean Modified = true, number Row = -1, number Column = -1)

Description

Sets the modified flag for a cell. If no row and column are -1, then change affects the entire grid.

Arguments

ObjectName
(string) The name of the object.

Modified
(boolean) Whether the cell or grid is set as modified. This is an optional argument. If omitted it will default to true.

Row
(number) The (zero-based) index of the row. Use -1 if you want to set the entire grid as modified.

Column
(number) The (zero-based) index of the column. Use -1 if you want to set the entire grid as modified.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetRedraw

DataGrid.SetRedraw(string ObjectName, boolean Redraw = true, boolean RedrawScrollbars = true)

Description

Stops/starts redraws on things like changing the number of rows and columns and autosizing, but not for user-intervention such as resizes.

Arguments

ObjectName
(string) The name of the object.

Redraw
(boolean) Whether redrawing is on (true) or off (false). This is an optional argument. If omitted it will default to true.

RedrawScrollbars
(boolean) Whether or not to redraw the scrollbars. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetRowCount

DataGrid.SetRowCount(string ObjectName, number RowCount)

Description

Sets the number of rows in the grid.

Arguments

ObjectName
(string) The name of the object.

RowCount
(number) The number of rows that should be in the grid.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetRowHeight

DataGrid.SetRowHeight(string ObjectName, number Row, number Height, boolean Redraw = true)

Description

Sets the height of a row in pixels.

Arguments

ObjectName
(string) The name of the object.

Row
(number) The (zero-based) index of the row.

Height
(number) The height of the row in pixels.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetRowHiding

DataGrid.SetRowHiding(string ObjectName, boolean AllowHiding = true)

Description

Sets whether or rows can be contracted to 0 height by the user with the mouse.

Arguments

ObjectName
(string) The name of the object.

AllowHiding
(boolean) Whether rows can be hidden. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetRowResize

DataGrid.SetRowResize(string ObjectName, boolean Resizable = true)

Description

Sets whether or rows are resizable by the user

Arguments

ObjectName
(string) The name of the object.

Resizable
(boolean) Whether columns can be resized. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetSelectable

DataGrid.SetSelectable(string ObjectName, boolean Selectable)

Description

Sets whether or not the user can select grid cells with the mouse or keyboard.

Arguments

ObjectName
(string) The name of the object.

Selectable
(boolean) Whether the grid cells are selectable.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetSelectedRange

DataGrid.SetSelectedRange(string ObjectName, number MinRow, number MinColumn, number MaxRow, number MaxColumn, boolean SelectCells = true, boolean Redraw = true)

Description

Selects or deselects a range of cells within the grid.

Arguments

ObjectName
(string) The name of the object.

MinRow
(number) The (zero-based) index of the row to start selection at.

MinColumn
(number) The (zero-based) index of the column to start selection at.

MaxRow
(number) The (zero-based) index of the row to stop selection at.

MaxColumn
(number) The (zero-based) index of the column to stop selection at.

SelectCells
(boolean) Whether the cell range is selected (true) or deselected (false). This is an optional argument. If omitted it will default to true.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetSingleColumnSelection

DataGrid.SetSingleColumnSelection(string ObjectName, boolean SingleColumnSelection)

Description

Sets the grid into (or out of) single column selection mode. This mode is only effective when in list mode.

Arguments

ObjectName
(string) The name of the object.

SingleColumnSelection
(boolean) Whether or not single column selection is enabled.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetSingleRowSelection

DataGrid.SetSingleRowSelection(string ObjectName, boolean SingleRowSelection)

Description

Sets the grid into (or out of) single row selection mode. This mode is only effective when in list mode.

Arguments

ObjectName
(string) The name of the object.

SingleRowSelection
(boolean) Whether or not single row selection is enabled.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetSortAscending

DataGrid.SetSortAscending(string ObjectName, boolean Ascending)

Description

Sets whether the current sort column is sorted ascending.

Arguments

ObjectName
(string) The name of the object.

Ascending
(boolean) Whether sort is ascending (true) or descending (false).

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetTabEnabled

DataGrid.SetTabEnabled(string ObjectName, boolean UseTabKey = true)

Description

Sets whether or not the Tab key is used to move the cell selection.

Arguments

ObjectName
(string) The name of the object.

UseTabKey
(boolean) Whether the tab key is enabled formoving between cells.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetToolTipsEnabled

DataGrid.SetToolTipsEnabled(string ObjectName, boolean Tooltips)

Description

Sets whether or not tooltips will be displayed for cells that cannot contain all of their text.

Arguments

ObjectName
(string) The name of the object.

Tooltips
(boolean) Whether tooltips will be displayed.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetTrackFocusCell

DataGrid.SetTrackFocusCell(string ObjectName, boolean TrackFocus, boolean Redraw = true)

Description

Sets whether or not the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border.

Arguments

ObjectName
(string) The name of the object.

TrackFocus
(boolean) Whether focus will be tracked.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetUnhideColumn

DataGrid.SetUnhideColumn(string ObjectName, boolean AllowUnhide = true)

Description

Gets whether or not 0 width columns can be resized by the user via mouse.

Arguments

ObjectName
(string) The name of the object.

AllowUnhide
(boolean) Sets whether or not hidden (0-width) rows can be unhidden by the user resizing the row. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetUnhideRow

DataGrid.SetUnhideRow(string ObjectName, boolean AllowUnhide = true)

Description

Gets whether or not 0 height rows can be resized by the user via mouse.

Arguments

ObjectName
(string) The name of the object.

AllowUnhide
(boolean) Sets whether or not hidden (0-height) rows can be unhidden by the user resizing the row. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SortTextItems

DataGrid.SortTextItems(string ObjectName, number Column, boolean Ascending, boolean Redraw = true)

Description

Sorts a column alphabetically in ascending or descending order.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The zero-based index of the column.

Ascending
(boolean) Whether sort is ascending (true) or descending (false). This is an optional argument. If omitted it will default to true.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.


DataGrid.SetHeaderSort

DataGrid.SetHeaderSort(string ObjectName, boolean SortOnClick)

Description
Sets whether or not rows are sorted on column header clicks when in list mode.

Arguments

ObjectName
(string) The name of the object.

SortOnClick
(boolean) Whether or not clicking a column header sorts the rows below it.

Returns

None.


DataGrid.SortTextItems(string ObjectName, number Column, boolean Ascending, boolean Redraw = true)

Description

Sorts a column alphabetically in ascending or descending order.

Arguments

ObjectName
(string) The name of the object.

Column
(number) The zero-based index of the column.

Ascending
(boolean) Whether sort is ascending (true) or descending (false). This is an optional argument. If omitted it will default to true.

Redraw
(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

Returns

Nothing. Call Application.GetLastError to find out if an error occurred.