gui_grid

Send grid commands to the gui client.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X        

Syntax

void gui_grid(cmd,parameter[,parameter...])
int           cmd
expr          parameter

Description

Sends commands to the current grid object. Commands are defined in dv.h:
Command Description Parameter(s)
gui_grid_clearRebuilds grid rows Number of rows in grid, initialized to null. 0 - original count.
gui_grid_deleteDeletes specified number of rows Row index to start delete operation.
Optional number of rows to delete (default 1).
gui_grid_freezeFreeze column Column number
gui_grid_headerChange column header Column number, header
gui_grid_highwaterHighwater row processing gui_grid_hw_off (default) reveals all the trailing null rows if they exist. gui_grid_hw_collapse runs the highwater processing one time trimming trailing null rows. gui_grid_hw_hide does not show trailing empty rows but their space is still reserved.
gui_grid_modifyModify or insert a row of NULLs Row index of affected row.
< 0Insert NULL row before Row index.
= 0Clear out Row index row.
> 0Insert NULL row after Row index
gui_grid_moveMove column Column number, new column position
gui_grid_rgbSet the cell color String: row col color. If row or col are <0, then all rows or cols are affected. If row or col are greater than the row or column count, then the last row or column is affected. Refer to field_color for color definitions
gui_grid_rowoffsetSet the current grid offset New row offset
gui_grid_saveSend grid data to clipboard and
optionally to Excel or a file in CSV format
Include headers (True/False) [,Excel | Filename]
gui_grid_scrollScroll to the indicated position.
"Bottom"Scroll vertically to the end of the grid. Optional parameter 1 (non-zero) positions to the last row.
"End"Scroll vertically to the end of the grid
"Home"Scroll vertically to the beginning of the grid
"Last"Scroll to the previously saved scrolling offset (client keeps the last scrolling offset automatically).
"LeftEnd"Scroll horizontally to the beginning of the grid
"RightEnd"Scroll horizontally to the end of the grid
"Top"Scroll vertically to the beginning of the grid. Optional parameter 1 (non-zero) positions to the first row.
gui_grid_styleStyle cell(s) Row number, column number[, style name] (-1 row/col means all). If style name is missing, then the style is removed.
gui_grid_tooltipControl tooltip Row number, column number[, tooltip] (-1 row/col means all). If tooltip is missing, then tooltip is removed. If column number is (-1), then the tooltip will also apply to the row tab. If a tooltip has already been set for a column, then it will be replaced.
gui_grid_unfreezeUnfreeze column Column number. Column is moved to the first unfrozen position. Column < 0 unfreezes all frozen columns.
gui_grid_virtualVirtual row processing True enables, false disables (default).
gui_grid_visibleControl grid visibility True visible (default), false hidden. Setting false can improve loading speed of large amounts of grid data however grid appears blank. Set true when loading is done and grid data appears. Optional string parameter displays a message on the screen.
gui_grid_widthChange column width Column number, width. If col < 0, then all columns are affected. Width:
-1auto sizing
-2proportional width (similar to "*" in XAML)
0hidden
nsize in pixels

Notes

The column number is always the zero-based column number in the original grid. Frozen columns are appended from the left. The parameters may be comma separated, e.g. gui_grid(gui_header,1,"New Header"), or in a string, e.g. gui_grid(gui_header,"1 New Header").

Example

Freeze columns 3 and 6:
gui_grid(gui_grid_freeze,3);
gui_grid(gui_grid_freeze,6);
Columns 3 and 6 are now frozen on the left side of the grid.

Send grid data to Excel:

gui_grid(gui_grid_save,"Excel");