Links

SalFormTableWindow

PPJ.Runtime.Windows.SalFormTableWindow
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Runtime.49 (4.9.0.0)
Top level table window implementation.
C#
VB.NET
public class SalFormTableWindow : SalForm, IEnumerable<SalTableRow>, IEnumerable
Public Class SalFormTableWindow
Inherits SalForm
Implements IEnumerable(Of SalTableRow), IEnumerable

Constructors

SalFormTableWindow()

Constructs a SalFormWindow object.

Properties

AllowAutoEditing

Boolean: Enables/Disables AutoEditing mode. When this mode is on, the grid automatically enters edit mode when a cell is selected. (Default: False)

AllowFiltering

Boolean: Enables/Disables the excel-style filtering feature. (Default: False)
Set the property UseNativeTypes to true to be able to use the type-specific filters, otherwise the filters operate on the displayed value. When using native types in conjunction with a non-standard format or an edit mask that cannot be parsed to a native value, it is possible to lose the edited value when it cannot be parsed.

AllowRowSizing

Boolean: Allow row sizing. (Default: True)

AllowSorting

Boolean: Enables/Disables automatic sorting on table columns. (Default: False)

Columns

SalTableColumnCollection: Returns the collection of columns.

ExtendLastColumn

Boolean: Enables/Disables the extension of the last column to fill the grid. (Default: False)

FocusRowStyle

FocusRowStyle: Enables/Disables the focus frame around the current row. (Default: Thick)

Icon

Icon: Overrides the default Image property.

Item(id)

SalTableColumn: Returns the table column object with the specified column ID. The ID is 1-based.

Item(name)

SalTableColumn: Returns the table column object with the specified name.

LinesPerRow

Int32: Number of lines per row.

ReadOnly

Boolean: Returns/Sets the ReadOnly flag. When the ReadOnly flag is true the entire TableWindow control cannot be edited. However, the Mouse, scrolling and the Keyboard are still active. (Default: False)

RowSizingStyle

RowsSizingStyle: Keeps all rows of the same height. (Default: FreeSize)

ShowCellLabels

Boolean: Gets or sets whether the grid should display labels over cells whose contents are partially hidden. (Default: False)

ShowCursor

Boolean: Enables/Disables the arrow icon on the current row. (Default: False)

ShowFocusRow

Boolean: Enables/Disables the focus frame around the current row. (Default: True)

TableWindow

SalTableWindow: Returns the internal table window control.

Trimming

StringTrimming: Defines how to trim the content that doesn't fit the width of the cell. (Default: None)

UseNativeTypes

Boolean: Returns or sets whether the grid tries to parse the edited value into the native type of the column. (Default: False)
When using native types in conjunction with a non-standard format or an edit mask that cannot be parsed to a native value, it is possible to lose the edited value when it cannot be parsed.

UseVisualStyles

Boolean: Enables/Disabled drawing of columns and rows headers using the current visual style theme renderer. (Default: False)

VirtualMode

Boolean: Enables or disables virtual mode. When virtual mode is on, the rows are fetched from the data source as they are scrolled into view. (Default: False)

Methods

AnyRows(nFlagsOn, nFlagsOff)

Determines whether any rows in the specified table window match certain flags.
Parameter
Type
Description
nFlagsOn
SalNumber
nFlagsOff
SalNumber
Returns: SalBoolean.

ClearSelection()

Deselects all rows of a table window.
Returns: SalBoolean.

ColumnAverage(columnID, flagsOn, flagsOff)

Computes the average of all column values or only specified column values in a table window.
Parameter
Type
Description
columnID
SalNumber
flagsOn
SalNumber
flagsOff
SalNumber
Returns: SalNumber.

ColumnSum(columnID, flagsOn, flagsOff)

Computes the sum of all column values or only specified column values in a table window.
Parameter
Type
Description
columnID
SalNumber
flagsOn
SalNumber
flagsOff
SalNumber
Returns: SalNumber.

CopyRows(flagsOn, flagsOff)

Copies the contents of the specified table window rows to the Clipboard in text format.
Parameter
Type
Description
flagsOn
SalNumber
flagsOff
SalNumber
Returns: SalBoolean.

CreateColumn(columnPos, dispWidth, maxChars, title)

Creates a table window column of string data type at runtime.
Parameter
Type
Description
columnPos
SalNumber
dispWidth
SalNumber
maxChars
SalNumber
title
SalString
Returns: SalNumber.

CreateColumnEx(columnPos, dispWidth, title, maxChars, datatype)

Creates a table window column using a given data type at runtime. Allowed types are DT_String, DT_Number and DT_DateTime
Parameter
Type
Description
columnPos
SalNumber
dispWidth
SalNumber
title
SalString
maxChars
SalNumber
datatype
SalNumber
Returns: SalNumber.

DefineRowHeader(title, width, flags, column)

Defines the appearance and behavior of a table window's row header.
Parameter
Type
Description
title
SalString
width
SalNumber
flags
SalNumber
column
Control
Returns: SalBoolean.

DefineSplitWindow(rowsLowerHalf, dragAdjust)

Splits a table window horizontally.
Parameter
Type
Description
rowsLowerHalf
SalNumber
dragAdjust
Returns: SalBoolean.

DeleteRow(row, flag)

Deletes a row from a table window but not from the database.
Parameter
Type
Description
row
SalNumber
flag
SalNumber
Returns: SalBoolean.

DeleteSelected(hSql)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.
Parameter
Type
Description
hSql
Returns: SalBoolean.

DeleteSelected(hSql, errorHandler)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.
Parameter
Type
Description
hSql
errorHandler
Returns: SalBoolean.

DestroyColumns()

Destroys all automatic columns created by SalTblCreateColumn or SalTblPopulate at runtime. This function only works on table windows that contain only automatic columns.
Returns: SalBoolean.

DoDeletes(hSql, flagsOn)

Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.
Parameter
Type
Description
hSql
flagsOn
SalNumber
Returns: SalBoolean.

DoDeletes(hSql, flagsOn, errorHandler)

Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.
Parameter
Type
Description
hSql
flagsOn
SalNumber
errorHandler
Returns: SalBoolean.

DoInserts(hSql, clearFlags)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.
Parameter
Type
Description
hSql
clearFlags
Returns: SalBoolean.

DoInserts(hSql, clearFlags, errorHandler)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.
Parameter
Type
Description
hSql
clearFlags
errorHandler
Returns: SalBoolean.

DoUpdates(hSql, clearFlags)

Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.
Parameter
Type
Description
hSql
clearFlags
Returns: SalBoolean.

DoUpdates(hSql, clearFlags, errorHandler)

Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.
Parameter
Type
Description
hSql
clearFlags
errorHandler
Returns: SalBoolean.

FetchRow(row)

Sends a SAM_FetchRow message to a table window if the row you specify is not currently in the table window cache.
Parameter
Type
Description
row
SalNumber
Returns: SalNumber.

FindNextRow(row, flagsOn, flagsOff)

Parameter
Type
Description
row
flagsOn
SalNumber
flagsOff
SalNumber
Returns: SalBoolean.

FindPrevRow(row, flagsOn, flagsOff)

Parameter
Type
Description
row
flagsOn
SalNumber
flagsOff
SalNumber
Returns: SalBoolean.

GetColumnText(columnID, text)

Parameter
Type
Description
columnID
SalNumber
text
Returns: SalBoolean.

GetColumnText(columnID)

Gets data from a column of a table window's context row.
Parameter
Type
Description
columnID
SalNumber
Returns: SalString.

GetColumnWindow(col, flags)

Gets the handle of a table window column.
Parameter
Type
Description
col
SalNumber
flags
SalNumber
Returns: SalWindowHandle.

GetContextRow()

Returns a table window's current context row. Before sending a SAM_FetchRow message, automatically sets the context row so that assignments made while processing the message reference the correct row.
Returns: SalNumber.

GetLinesPerRow(lines)

Parameter
Type
Description
lines
Returns: SalBoolean.

GetLinesPerRow()

Retrieves the height of a row in lines.
Returns: SalNumber.

GetLockedColumns()

Retrieves the number of locked table window columns.
Returns: SalNumber.

GetMergedRange(row, col, clip)

Overrides GetMergedRange to allow the SalTableWindow class to override the method.
Parameter
Type
Description
row
Int32
col
Int32
clip
Boolean
Returns: CellRange.

GetRowFlags(row, flags)

Queries a row's flags.
Parameter
Type
Description
row
SalNumber
flags
SalNumber
Returns: SalBoolean.

GetTableFlags(flags)

Tests the state of a table window's flags.
Parameter
Type
Description
flags
SalNumber
Returns: SalBoolean.

HitTest(x, y, row, col, flags)

Parameter
Type
Description
x
SalNumber
y
SalNumber
row
col
flags
Returns: SalBoolean.

InsertRow(row)

Inserts a new blank row into a table window.
Parameter
Type
Description
row
SalNumber
Returns: SalNumber.

KillCellEdit()

Takes a row out of edit mode and selects the row. This causes the row to receive both SAM_Validate and SAM_KillFocus messages.
Returns: SalBoolean.

KillFocusRow()

Turns off the table window's focus frame.
Returns: SalBoolean.

PasteRows()

Pastes the contents of the Clipboard to the specified table window. Assumes the Clipboard data is in text format with cells delimited by tab characters and rows delimited by end-of-line characters. Inserts the new rows into the table window without overwriting existing rows, and converts the data to the data types of the corresponding table window columns.
Returns: SalBoolean.

Populate(hSql, select, method)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.
Parameter
Type
Description
hSql
select
SalString
method
SalNumber
Returns: SalBoolean.

Populate(hSql, select, method, errorHandler)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.
Parameter
Type
Description
hSql
select
SalString
method
SalNumber
errorHandler
Returns: SalBoolean.

Populate(hSql, select)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.
Parameter
Type
Description
hSql
select
SalString
Returns: SalBoolean.

Populate(hSql, select, errorHandler)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.
Parameter
Type
Description
hSql
select
SalString
errorHandler