Skip to main content
Version: 2025

SalFormTableWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Web.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 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 memberDisableSplitGrid

Boolean: Prevents the split grid from getting the focus while allowing for he horizontal scroll and column resizing. (Default: False)

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 memberTableWindow

SalTableWindow: Returns the internal table window control.

Methods

Instance memberAnyRows(nFlagsOn, nFlagsOff)

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

ParameterTypeDescription
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalBoolean.

Instance memberBeginUpdate()

Prevents the control from updating until the EndUpdate method is called.

Instance memberClearSelection()

Deselects all rows of a table window.

Returns: SalBoolean.

Instance memberColumnAverage(nColumnID, nFlagsOn, nFlagsOff)

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

ParameterTypeDescription
nColumnIDSalNumber
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalNumber.

Instance memberColumnSum(nColumnID, nFlagsOn, nFlagsOff)

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

ParameterTypeDescription
nColumnIDSalNumber
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalNumber.

Instance memberCopyRows(nFlagsOn, nFlagsOff)

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

ParameterTypeDescription
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalBoolean.

Instance memberCreateColumn(nColumnPos, nDispWidth, nMaxChars, sTitle)

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

ParameterTypeDescription
nColumnPosSalNumber
nDispWidthSalNumber
nMaxCharsSalNumber
sTitleSalString

Returns: SalNumber.

Instance memberCreateColumnEx(nColumnPos, nDispWidth, sTitle, nMaxChars, nDatatype)

Creates a table window column using a given data type at runtime. Allowed types are DT_String, DT_Number and DT_DateTime

ParameterTypeDescription
nColumnPosSalNumber
nDispWidthSalNumber
sTitleSalString
nMaxCharsSalNumber
nDatatypeSalNumber

Returns: SalNumber.

Instance memberDefineRowHeader(sTitle, nWidth, nFlags, column)

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

ParameterTypeDescription
sTitleSalString
nWidthSalNumber
nFlagsSalNumber
columnControl

Returns: SalBoolean.

Instance memberDefineSplitWindow(nRowsLowerHalf, bDragAdjust)

Splits a table window horizontally.

ParameterTypeDescription
nRowsLowerHalfSalNumber
bDragAdjustSalBoolean

Returns: SalBoolean.

Instance memberDeleteRow(nRow, nFlag)

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

ParameterTypeDescription
nRowSalNumber
nFlagSalNumber

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, nFlagsOn)

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

ParameterTypeDescription
hSqlSalSqlHandle
nFlagsOnSalNumber

Returns: SalBoolean.

Instance memberDoDeletes(hSql, nFlagsOn, errorHandler)

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

ParameterTypeDescription
hSqlSalSqlHandle
nFlagsOnSalNumber
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberDoInserts(hSql, bClearFlags)

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

ParameterTypeDescription
hSqlSalSqlHandle
bClearFlagsSalBoolean

Returns: SalBoolean.

Instance memberDoInserts(hSql, bClearFlags, errorHandler)

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

ParameterTypeDescription
hSqlSalSqlHandle
bClearFlagsSalBoolean
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberDoUpdates(hSql, bClearFlags)

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

ParameterTypeDescription
hSqlSalSqlHandle
bClearFlagsSalBoolean

Returns: SalBoolean.

Instance memberDoUpdates(hSql, bClearFlags, errorHandler)

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

ParameterTypeDescription
hSqlSalSqlHandle
bClearFlagsSalBoolean
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberEndUpdate()

Resumes updating of the list view control after suspending it by the BeginUpdate method.

Instance memberFetchRow(nRow)

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

ParameterTypeDescription
nRowSalNumber

Returns: SalNumber.

Instance memberFindNextRow(nRow, nFlagsOn, nFlagsOff)

ParameterTypeDescription
nRowSalNumber&
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalBoolean.

Instance memberFindPrevRow(nRow, nFlagsOn, nFlagsOff)

ParameterTypeDescription
nRowSalNumber&
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalBoolean.

Instance memberGetColumnText(nColumnID, sText)

ParameterTypeDescription
nColumnIDSalNumber
sTextSalString&

Returns: SalBoolean.

Instance memberGetColumnText(nColumnID)

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

ParameterTypeDescription
nColumnIDSalNumber

Returns: SalString.

Instance memberGetColumnWindow(nCol, nFlags)

Gets the handle of a table window column.

ParameterTypeDescription
nColSalNumber
nFlagsSalNumber

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(nLines)

ParameterTypeDescription
nLinesSalNumber&

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 memberGetRowFlags(nRow, nFlags)

Queries a row's flags.

ParameterTypeDescription
nRowSalNumber
nFlagsSalNumber

Returns: SalBoolean.

Instance memberGetTableFlags(nFlags)

Tests the state of a table window's flags.

ParameterTypeDescription
nFlagsSalNumber

Returns: SalBoolean.

Instance memberInsertRow(nRow)

Inserts a new blank row into a table window.

ParameterTypeDescription
nRowSalNumber

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, sSelect, nMethod)

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
sSelectSalString
nMethodSalNumber

Returns: SalBoolean.

Instance memberPopulate(hSql, sSelect, nMethod, 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
sSelectSalString
nMethodSalNumber
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberPopulate(hSql, sSelect)

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
sSelectSalString

Returns: SalBoolean.

Instance memberPopulate(hSql, sSelect, 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
sSelectSalString
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Instance memberQueryFocusCell(nRow, hWndCol)

ParameterTypeDescription
nRowSalNumber&
hWndColSalWindowHandle&

Returns: SalBoolean.

Instance memberQueryRowHeader(sTitle, nMaxTitle, nWidth, nFlags, hWndCol)

ParameterTypeDescription
sTitleSalString&
nMaxTitleSalNumber
nWidthSalNumber&
nFlagsSalNumber&
hWndColSalWindowHandle&

Returns: SalBoolean.

Instance memberQueryScroll(nPosition, nMinRange, nMaxRange)

ParameterTypeDescription
nPositionSalNumber&
nMinRangeSalNumber&
nMaxRangeSalNumber&

Returns: SalBoolean.

Instance memberQuerySplitWindow(nRowsLowerHalf, bDragAdjust)

ParameterTypeDescription
nRowsLowerHalfSalNumber&
bDragAdjustSalBoolean&

Returns: SalBoolean.

Instance memberQueryVisibleRange(nMinRange, nMaxRange)

ParameterTypeDescription
nMinRangeSalNumber&
nMaxRangeSalNumber&

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(nRow, column, nFlags)

Scrolls a table window to the specified row and column.

ParameterTypeDescription
nRowSalNumber
columnControl
nFlagsSalNumber

Returns: SalBoolean.

Instance memberScrollRow(nRow, column)

Scrolls a table window to the specified row and column.

ParameterTypeDescription
nRowSalNumber
columnControl

Returns: SalBoolean.

Instance memberSetColumnText(nColumnID, sText)

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

ParameterTypeDescription
nColumnIDSalNumber
sTextSalString

Returns: SalBoolean.

Instance memberSetContextRow(nRow)

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
nRowSalNumber

Returns: SalBoolean.

Instance memberSetFlagsAnyRows(nFlags, bSet, nFlagsOn, nFlagsOff)

Sets or clears row flags.

ParameterTypeDescription
nFlagsSalNumber
bSetSalBoolean
nFlagsOnSalNumber
nFlagsOffSalNumber

Returns: SalBoolean.

Instance memberSetFocusCell(nRow, column)

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
nRowSalNumber
columnControl

Returns: SalBoolean.

Instance memberSetFocusRow(nRow)

Sets a table window's focus frame row.

ParameterTypeDescription
nRowSalNumber

Returns: SalBoolean.

Instance memberSetLinesPerRow(nLines)

Sets the height of a row in lines.

ParameterTypeDescription
nLinesSalNumber

Returns: SalBoolean.

Instance memberSetLockedColumns(nLockedColumns)

Sets the number of locked table window columns.

ParameterTypeDescription
nLockedColumnsSalNumber

Returns: SalBoolean.

Instance memberSetRange(nMin, nMax)

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

ParameterTypeDescription
nMinSalNumber
nMaxSalNumber

Returns: SalBoolean.

Instance memberSetRow(nRowPos)

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

ParameterTypeDescription
nRowPosSalNumber

Returns: SalNumber.

Instance memberSetRowFlags(nRow, nFlags, bSet)

Sets or clears a table window row's flags.

ParameterTypeDescription
nRowSalNumber
nFlagsSalNumber
bSetSalBoolean

Returns: SalBoolean.

Instance memberSetTableFlags(nFlags, bSet)

Sets or clears a table window's flags.

ParameterTypeDescription
nFlagsSalNumber
bSetSalBoolean

Returns: SalBoolean.

Instance memberSortRows(nColumnID, nOrder)

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

ParameterTypeDescription
nColumnIDSalNumber
nOrderSalNumber

Returns: SalBoolean.

Implements

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