Skip to content

FarPointGridAX

This behavior pattern implements standard behavior for Grid control.

Extends SeSSimulatedObject

Behavior Pattern: FarPointGridAXBehavior

Property Summary

Property Description Getter Setter
CellComboList Get array of dropdown values for a given cell. GetCellComboList
CellInfo

Returns object with following fields.

GetCellInfo
ColumnCount Number of columns in the grid. GetColumnCount
ColumnHeaders Get array of column captions. GetColumnHeaders
ColumnIndex Get column index by name. GetColumnIndex
ColumnInfo

Returns object with following fields.

GetColumnInfo
GridInfo

Returns object with following fields.

GetGridInfo
RowCount Number of rows in the table. GetRowCount
RowHeaders Get array of row captions. GetRowHeaders
RowInfo

Returns object with following fields.

GetRowInfo
SelectedCells Returns string of cell coordinates delimited by separators or an array of coordinate objects for selected cells. GetSelectedCells
SelectedColumn Index of the selected column. GetSelectedColumn SetSelectedColumn
SelectedRow Index of the selected row. GetSelectedRow SetSelectedRow
SelectedRowsCount Get number of selected rows. GetSelectedRowsCount
Text Text of the specified cell. GetText SetText

Action Summary

Action Description
DoActivateCell Make specified cell active
DoClearCell Clear specified cell range
DoClickCell Clicks the specified cell
DoExportGrid Save Grid data to file
DoFullText Return whole grid as text

Property Detail

CellComboList

Get array of dropdown values for a given cell.

Getter Parameters:

Name Type Description
row number Row index
col number Column index

Type: array

Accessors: GetCellComboList

value = SeS('SomeFarPointGridAX').GetCellComboList(row, col)

CellInfo

Returns object with following fields.

ActionOnEnter one of:
            0 None          (Default) Active cell does not change
            1 Up                Active cell moves up
            2 Down          Active cell moves down
            3 Left          Active cell moves left
            4 Right         Active cell moves right
            5 Next          Next cell becomes active cell
            6 Previous      Previous cell becomes active cell
            7 Same          Current cell remains active cell
            8 Next Row          Active cell moves to first column of next row


EditMode
Locked
MoveOnArrow    ArrowsExitEditMode;
NextCellOnTab  ProcessTab;

Type one of:
            0 Date          Creates date cell
            1 Edit          (Default) Creates edit cell
            4 PIC               Creates PIC cell
            5 Static Text       Creates static text cell
            6 Time          Creates time cell
            7 Button            Creates button cell
            8 Combo Box     Creates combo box cell
            9 Picture           Creates picture cell
            10 Check Box        Creates check box cell
            11 OwnerDrawn   Creates ownerdrawn cell
            12 Currency     Creates currency cell
            13 Number           Creates numeric cell
            14 Percent      Creates percent cell
            15 Scientific       Creates scientific cell
            16 Custom           Creates custom cell

Text
Value

Width
WidthTwips
Height
HeightTwips

Left
Right
Top
Bottom

Visible

row
col

Getter Parameters:

Name Type Description
row number Row index
col number Column index

Type: object

Accessors: GetCellInfo

value = SeS('SomeFarPointGridAX').GetCellInfo(row, col)

ColumnCount

Number of columns in the grid.

Type: number

Accessors: GetColumnCount

value = SeS('SomeFarPointGridAX').GetColumnCount()

ColumnHeaders

Get array of column captions.

Type: array

Accessors: GetColumnHeaders

value = SeS('SomeFarPointGridAX').GetColumnHeaders()

ColumnIndex

Get column index by name.

Getter Parameters:

Name Type Description
colName string Column name

Type: number

Accessors: GetColumnIndex

value = SeS('SomeFarPointGridAX').GetColumnIndex(colName)

ColumnInfo

Returns object with following fields.

Header - Column caption, if any
Width - Width in pixels
WidthTwips - Width in TWIPs
Hidden
Index
Visible

Getter Parameters:

Name Type Description
col number Column index

Type: object

Accessors: GetColumnInfo

value = SeS('SomeFarPointGridAX').GetColumnInfo(col)

GridInfo

Returns object with following fields.

ActiveCol
ActiveRow
ColCount
RowCount

Enabled
Visible

Top
Bottom
Height
Width

Rect [Top, Right, Bottom, Left]

Left
Right

hWnd

TopRow
LeftCol

Type: object

Accessors: GetGridInfo

value = SeS('SomeFarPointGridAX').GetGridInfo()

RowCount

Number of rows in the table.

Type: number

Accessors: GetRowCount

value = SeS('SomeFarPointGridAX').GetRowCount()

RowHeaders

Get array of row captions.

Type: array

Accessors: GetRowHeaders

value = SeS('SomeFarPointGridAX').GetRowHeaders()

RowInfo

Returns object with following fields.

ActiveCol
ActiveRow
ColCount
RowCount

Enabled
Visible

Top
Bottom
Height
Width

Rect [Top, Right, Bottom, Left]

Left
Right

hWnd

TopRow
LeftCol

Getter Parameters:

Name Type Description
row number Row index

Type: object

Accessors: GetRowInfo

value = SeS('SomeFarPointGridAX').GetRowInfo(row)

SelectedCells

Returns string of cell coordinates delimited by separators or an array of coordinate objects for selected cells.

Getter Parameters:

Name Type Description
asArray boolean If set to true, function returns an array.
rowcolSep string row separator
Optional.
cellSep string cell separator
Optional.

Type: string

Accessors: GetSelectedCells

value = SeS('SomeFarPointGridAX').GetSelectedCells(asArray, rowcolSep, cellSep)

SelectedColumn

Index of the selected column.

Type: number

Accessors: GetSelectedColumn, SetSelectedColumn

value = SeS('SomeFarPointGridAX').GetSelectedColumn()

SeS('SomeFarPointGridAX').SetSelectedColumn(col)

SelectedRow

Index of the selected row.

Type: number

Accessors: GetSelectedRow, SetSelectedRow

value = SeS('SomeFarPointGridAX').GetSelectedRow()

SeS('SomeFarPointGridAX').SetSelectedRow(row)

SelectedRowsCount

Get number of selected rows.

Type: number

Accessors: GetSelectedRowsCount

value = SeS('SomeFarPointGridAX').GetSelectedRowsCount()

Text

Text of the specified cell.

Getter Parameters:

Name Type Description
row number Zero-based index if the row.
col number Zero-based index of the column.

Type: string

Accessors: GetText, SetText

value = SeS('SomeFarPointGridAX').GetText(row, col)

SeS('SomeFarPointGridAX').SetText(col, row, value)

Action Detail

DoActivateCell

Make specified cell active

SeS('SomeFarPointGridAX').DoActivateCell(row, col)

Parameters:

Name Type Description
row number Column to use
col number Column to use

DoClearCell

Clear specified cell range

SeS('SomeFarPointGridAX').DoClearCell(col1, row1, col2, row2)

Parameters:

Name Type Description
col1 number Column to use
row1 number Column to use
col2 number Column to use
row2 number Column to use

DoClickCell

Clicks the specified cell

SeS('SomeFarPointGridAX').DoClickCell(col, row, clickType, xOffset, yOffset)

Parameters:

Name Type Description
col number Zero-based index of the column.
row number Zero-based index if the row.
clickType string Type of click, can be one of "L" - left click, "LD" - double left click, "R" - right click, "RD" - double right click, "M" - middle click, "MD" - double middle click, "N" - don't click Possible values: "L", "LD", "R", "RD", "M", "MD", "N"
Optional, Default: "L".
xOffset number X offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the width.
Optional.
yOffset number Y offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the height.
Optional.

Returns:

boolean: 'true' if successful, 'false' otherwise

DoExportGrid

Save Grid data to file

SeS('SomeFarPointGridAX').DoExportGrid(fileName, type)

Parameters:

Name Type Description
fileName string Path to destination file
type string Export file format (EXCEL, HTML, XML). Empty ("") for tab-separated text Possible values: "EXCEL", "HTML", "XML", ""
Optional, Default: "L".

DoFullText

Return whole grid as text

SeS('SomeFarPointGridAX').DoFullText(saveToFile, fileName)

Parameters:

Name Type Description
saveToFile boolean 'true' if you need to have copy of the text in the file
fileName string Path to destination file