Skip to main content

SalFormTableWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.49 (4.9.0.0)

Top level table window implementation.

public class SalFormTableWindow : SalForm, IEnumerable<SalTableRow>, IEnumerable

Constructors

Instance memberSalFormTableWindow()

Constructs a SalFormWindow object.

Properties

Instance memberAllowAutoEditing

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

Instance memberAllowFiltering

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.

Instance memberAllowRowSizing

Boolean: Allow row sizing. (Default: True)

Instance memberAllowSorting

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

Instance memberColumns

SalTableColumnCollection: Returns the collection of columns.

Instance memberExtendLastColumn

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

Instance memberFocusRowStyle

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

Instance memberIcon

Icon: Overrides the default Image property.

Instance memberItem(id)

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

Instance memberItem(name)

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

Instance memberLinesPerRow

Int32: Number of lines per row.

Instance memberReadOnly

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)

Instance memberRowSizingStyle

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

Instance memberShowCellLabels

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

Instance memberShowCursor

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

Instance memberShowFocusRow

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

Instance memberTableWindow

SalTableWindow: Returns the internal table window control.

Instance memberTrimming

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

Instance memberUseNativeTypes

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.

Instance memberUseVisualStyles

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

Instance memberVirtualMode

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

Instance memberAnyRows(nFlagsOn, nFlagsOff)

Determines whether any rows in the specified table window match certain flags.

ParameterTypeDescription
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalBoolean.

Instance memberClearSelection()

Deselects all rows of a table window.

Returns: SalBoolean.

Instance memberColumnAverage(columnID, flagsOn, flagsOff)

Computes the average of all column values or only specified column values in a table window.

ParameterTypeDescription
columnIDSalNumber
flagsOnSalNumber
flagsOffSalNumber

Returns: SalNumber.

Instance memberColumnSum(columnID, flagsOn, flagsOff)

Computes the sum of all column values or only specified column values in a table window.

ParameterTypeDescription
columnIDSalNumber
flagsOnSalNumber
flagsOffSalNumber

Returns: SalNumber.

Instance memberCopyRows(flagsOn, flagsOff)

Copies the contents of the specified table window rows to the Clipboard in text format.

ParameterTypeDescription
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Instance memberCreateColumn(columnPos, dispWidth, maxChars, title)

Creates a table window column of string data type at runtime.

ParameterTypeDescription
columnPosSalNumber
dispWidthSalNumber
maxCharsSalNumber
titleSalString

Returns: SalNumber.

Instance memberCreateColumnEx(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

ParameterTypeDescription
columnPosSalNumber
dispWidthSalNumber
titleSalString
maxCharsSalNumber
datatypeSalNumber

Returns: SalNumber.

Instance memberDefineRowHeader(title, width, flags, column)

Defines the appearance and behavior of a table window's row header.

ParameterTypeDescription
titleSalString
widthSalNumber
flagsSalNumber
columnControl

Returns: SalBoolean.

Instance memberDefineSplitWindow(rowsLowerHalf, dragAdjust)

Splits a table window horizontally.

ParameterTypeDescription
rowsLowerHalfSalNumber
dragAdjustSalBoolean

Returns: SalBoolean.

Instance memberDeleteRow(row, flag)

Deletes a row from a table window but not from the database.

ParameterTypeDescription
rowSalNumber
flagSalNumber

Returns: SalBoolean.

Instance memberDeleteSelected(hSql)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

ParameterTypeDescription
hSqlSalSqlHandle

Returns: SalBoolean.

Instance memberDeleteSelected(hSql, errorHandler)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

ParameterTypeDescription
hSqlSalSqlHandle
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberDestroyColumns()

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.

Instance memberDoDeletes(hSql, flagsOn)

Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.

ParameterTypeDescription
hSqlSalSqlHandle
flagsOnSalNumber

Returns: SalBoolean.

Instance memberDoDeletes(hSql, flagsOn, errorHandler)

Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.

ParameterTypeDescription
hSqlSalSqlHandle
flagsOnSalNumber
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberDoInserts(hSql, clearFlags)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.

ParameterTypeDescription
hSqlSalSqlHandle
clearFlagsSalBoolean

Returns: SalBoolean.

Instance memberDoInserts(hSql, clearFlags, errorHandler)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.

ParameterTypeDescription
hSqlSalSqlHandle
clearFlagsSalBoolean
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberDoUpdates(hSql, clearFlags)

Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.

ParameterTypeDescription
hSqlSalSqlHandle
clearFlagsSalBoolean

Returns: SalBoolean.

Instance memberDoUpdates(hSql, clearFlags, errorHandler)

Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.

ParameterTypeDescription
hSqlSalSqlHandle
clearFlagsSalBoolean
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberFetchRow(row)

Sends a SAM_FetchRow message to a table window if the row you specify is not currently in the table window cache.

ParameterTypeDescription
rowSalNumber

Returns: SalNumber.

Instance memberFindNextRow(row, flagsOn, flagsOff)

ParameterTypeDescription
rowSalNumber&
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Instance memberFindPrevRow(row, flagsOn, flagsOff)

ParameterTypeDescription
rowSalNumber&
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Instance memberGetColumnText(columnID, text)

ParameterTypeDescription
columnIDSalNumber
textSalString&

Returns: SalBoolean.

Instance memberGetColumnText(columnID)

Gets data from a column of a table window's context row.

ParameterTypeDescription
columnIDSalNumber

Returns: SalString.

Instance memberGetColumnWindow(col, flags)

Gets the handle of a table window column.

ParameterTypeDescription
colSalNumber
flagsSalNumber

Returns: SalWindowHandle.

Instance memberGetContextRow()

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.

Instance memberGetLinesPerRow(lines)

ParameterTypeDescription
linesSalNumber&

Returns: SalBoolean.

Instance memberGetLinesPerRow()

Retrieves the height of a row in lines.

Returns: SalNumber.

Instance memberGetLockedColumns()

Retrieves the number of locked table window columns.

Returns: SalNumber.

Instance memberGetMergedRange(row, col, clip)

Overrides GetMergedRange to allow the SalTableWindow class to override the method.

ParameterTypeDescription
rowInt32
colInt32
clipBoolean

Returns: CellRange.

Instance memberGetRowFlags(row, flags)

Queries a row's flags.

ParameterTypeDescription
rowSalNumber
flagsSalNumber

Returns: SalBoolean.

Instance memberGetTableFlags(flags)

Tests the state of a table window's flags.

ParameterTypeDescription
flagsSalNumber

Returns: SalBoolean.

Instance memberHitTest(x, y, row, col, flags)

ParameterTypeDescription
xSalNumber
ySalNumber
rowSalNumber&
colSalWindowHandle&
flagsSalNumber&

Returns: SalBoolean.

Instance memberInsertRow(row)

Inserts a new blank row into a table window.

ParameterTypeDescription
rowSalNumber

Returns: SalNumber.

Instance memberKillCellEdit()

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.

Instance memberKillFocusRow()

Turns off the table window's focus frame.

Returns: SalBoolean.

Instance memberPasteRows()

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.

Instance memberPopulate(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.

ParameterTypeDescription
hSqlSalSqlHandle
selectSalString
methodSalNumber

Returns: SalBoolean.

Instance memberPopulate(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.

ParameterTypeDescription
hSqlSalSqlHandle
selectSalString
methodSalNumber
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberPopulate(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.

ParameterTypeDescription
hSqlSalSqlHandle
selectSalString

Returns: SalBoolean.

Instance memberPopulate(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.

ParameterTypeDescription
hSqlSalSqlHandle
selectSalString
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberQueryFocusCell(row, col)

ParameterTypeDescription
rowSalNumber&
colSalWindowHandle&

Returns: SalBoolean.

Instance memberQueryRowHeader(title, maxTitle, width, flags, col)

ParameterTypeDescription
titleSalString&
maxTitleSalNumber
widthSalNumber&
flagsSalNumber&
colSalWindowHandle&

Returns: SalBoolean.

Instance memberQueryScroll(position, minRange, maxRange)

ParameterTypeDescription
positionSalNumber&
minRangeSalNumber&
maxRangeSalNumber&

Returns: SalBoolean.

Instance memberQuerySplitWindow(rowsLowerHalf, dragAdjust)

ParameterTypeDescription
rowsLowerHalfSalNumber&
dragAdjustSalBoolean&

Returns: SalBoolean.

Instance memberQueryVisibleRange(minRange, maxRange)

ParameterTypeDescription
minRangeSalNumber&
maxRangeSalNumber&

Returns: SalBoolean.

Instance memberResetTable()

Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.

Returns: SalBoolean.

Instance memberScrollRow(row, column, flags)

Scrolls a table window to the specified row and column.

ParameterTypeDescription
rowSalNumber
columnControl
flagsSalNumber

Returns: SalBoolean.

Instance memberScrollRow(row, column)

Scrolls a table window to the specified row and column.

ParameterTypeDescription
rowSalNumber
columnControl

Returns: SalBoolean.

Instance memberSetColumnText(columnID, text)

Assigns data to a column of a table window's context row.

ParameterTypeDescription
columnIDSalNumber
textSalString

Returns: SalBoolean.

Instance memberSetContextRow(row)

Sets a table window's context row. Setting the context row does not send a SAM_FetchRow message. If the row is not currently in memory, creates a new row in memory and sets its cell values to null.

ParameterTypeDescription
rowSalNumber

Returns: SalBoolean.

Instance memberSetFlagsAnyRows(flags, set, flagsOn, flagsOff)

Sets or clears row flags.

ParameterTypeDescription
flagsSalNumber
setSalBoolean
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Instance memberSetFocusCell(row, column, editMin, editMax)

Sets the focus to the specified table window cell (row and column). Puts the table window into edit mode and lets the user select a portion of the data in the cell.

ParameterTypeDescription
rowSalNumber
columnControl
editMinSalNumber
editMaxSalNumber

Returns: SalBoolean.

Instance memberSetFocusRow(row)

Sets a table window's focus frame row.

ParameterTypeDescription
rowSalNumber

Returns: SalBoolean.

Instance memberSetLinesPerRow(lines)

Sets the height of a row in lines.

ParameterTypeDescription
linesSalNumber

Returns: SalBoolean.

Instance memberSetLockedColumns(lockedColumns)

Sets the number of locked table window columns.

ParameterTypeDescription
lockedColumnsSalNumber

Returns: SalBoolean.

Instance memberSetRange(min, max)

Defines the minimum and maximum rows (range) of a table.

ParameterTypeDescription
minSalNumber
maxSalNumber

Returns: SalBoolean.

Instance memberSetRow(rowPos)

Sets the focus to the first, last, next, or previous row in a table window.

ParameterTypeDescription
rowPosSalNumber

Returns: SalNumber.

Instance memberSetRowFlags(row, flags, set)

Sets or clears a table window row's flags.

ParameterTypeDescription
rowSalNumber
flagsSalNumber
setSalBoolean

Returns: SalBoolean.

Instance memberSetTableFlags(flags, set)

Sets or clears a table window's flags.

ParameterTypeDescription
flagsSalNumber
setSalBoolean

Returns: SalBoolean.

Instance memberSortRows(columnID, order)

Sorts the rows of a table window based on the values in one of the table window's columns.

ParameterTypeDescription
columnIDSalNumber
orderSalNumber

Returns: SalBoolean.

Inherited By

NameDescription
SalQuickToolTipTableWindowPushbutton with tool tip support

Implements

NameDescription
ISalWindowAll Sal windows (Child windows, Forms, Dialogs and MDIs) implement this interface.