Skip to main content

SalTableWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.50 (5.0.0.0)

Displays SAL table rows and columns with window actions, cell editing, and row enumeration.

public class SalTableWindow : SalTableWindowBase, ISalWindow, ISalControl, IEnumerable<SalTableRow>, IEnumerable

Example:

void AddControl(System.Windows.Forms.Control parent)
{
var control = new PPJ.Runtime.Windows.SalTableWindow();
control.Name = "SalTableWindow";
parent.Controls.Add(control);
}

Constructors

Instance member SalTableWindow()

Initializes the table window, its SAL message host, and its table-filling helper.

Properties

Instance member AllowAutoEditing

Boolean: Gets or sets whether eligible focused cells automatically enter edit mode. (Default: False)

Instance member AllowFiltering

Boolean: Gets or sets interactive filtering in the main grid. (Default: False)

Disabling filtering resets every main-grid column filter.

Instance member AllowRowSizing

Boolean: Gets or sets the row-header flag that permits row resizing. (Default: False)

Static member BackgroundFillInterval

Int32: Gets or sets the timer interval in milliseconds used when starting background table population.

Static member BackgroundFillRows

Int32: Gets or sets the maximum number of rows fetched during each background-fill batch.

Instance member CellContextMenu

ContextMenu: Gets or sets the legacy context menu assigned to cell editors. (Default: null)

Instance member CellContextMenuStrip

ContextMenuStrip: Gets or sets the Windows Forms menu strip assigned to cell editors. (Default: null)

Instance member CultureInfo

CultureInfo: Gets or sets the culture used by table values, falling back at run time to the containing SAL form and then Sys.CultureInfo. (Default: null)

Assigning null or the current Sys.CultureInfo clears the explicit setting. Throws:

Static member DefaultFocusRowStyle

FocusRowStyle: Gets or sets the initial focus-row frame style for subsequently constructed tables.

Instance member GetMergedRangeHandler

GetMergedRangeDelegate: Gets or sets the callback that overrides merged-range resolution.

Instance member IsEmbedded

Boolean: Gets whether this table was created as the embedded grid of a form table.

Instance member Item(id)

SalTableColumn: Gets a column by its SAL column identifier.

Instance member Item(name)

SalTableColumn: Gets a column by its control name.

Instance member Label

Control: Gets or sets the label associated with this control through the SAL window implementation.

Instance member LinesPerRow

Int32: Gets or sets the number of text lines used to calculate row height. (Default: 1)

Only values from 1 through 32 are accepted; other assignments are ignored.

Instance member Modified

Boolean: Gets or sets the table-level SAL modification flag.

Instance member NamedProperties

SalNamedProperties: Gets the SAL named-property collection associated with this control.

Instance member ReadOnly

Boolean: Gets or sets whether editing is disabled in both main and split grids. (Default: False)

Instance member RowSizingStyle

RowsSizingStyle: Gets or sets how user row resizing propagates to other rows. (Default: FreeSize)

Instance member UseNativeTypes

Boolean: Gets or sets native data-type handling for cell values and refreshes every column cell type when changed. (Default: False)

Instance member VirtualMode

Boolean: Gets or sets whether the main grid fetches visible rows after scrolling. (Default: False)

Enabling this mode installs a scroll handler and enables delayed scrolling.

Methods

Instance member AnyRows(flagsOn, flagsOff)

Checks both grids for a nondeleted row matching the flag filters.

ParameterTypeDescription
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberRow flags that must all be absent.

Returns: SalBoolean. True when a matching row exists; otherwise, false.

Instance member AutoSizeCols(colStart, colEnd, extraSpace)

Sizes an inclusive range of columns to their contents and synchronizes widths across both grids and SAL column controls.

ParameterTypeDescription
colStartInt32The first native grid-column index.
colEndInt32The last native grid-column index.
extraSpaceInt32Additional width in pixels.

When a split grid exists, each column uses the larger width required by either grid.

Instance member BringWindowToTop()

Brings this control to the front, or activates it when it is a top-level or MDI form.

Returns: SalBoolean. True if the translated control exists; otherwise, false.

Instance member CenterWindow()

Centers this window within its parent or, for a top-level form, its owner or screen working area.

Returns: SalBoolean. True when the translated control exists; otherwise, false.

A top-level form is constrained to the selected screen working area. A control without a parent is unchanged unless it is a top-level form.

Instance member ClearCursor(type)

Restores the default cursor for a role, using the I-beam for TextBox subclasses.

ParameterTypeDescription
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.

Instance member ClearSelection()

Clears selected rows in the main and split grids.

Returns: SalBoolean. Always true after processing.

Instance member ColumnAverage(columnId, flagsOn, flagsOff)

Calculates the numeric average for matching rows of a column, preserving row context.

ParameterTypeDescription
columnIdSalNumberThe SAL column identifier.
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberRow flags that must all be absent.

Returns: SalNumber. The average, or zero for an unresolved column or no matching rows.

Instance member ColumnSum(columnId, flagsOn, flagsOff)

Sums numeric values for matching rows of a column, preserving row context.

ParameterTypeDescription
columnIdSalNumberThe SAL column identifier.
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberRow flags that must all be absent.

Returns: SalNumber. The sum, or zero for an unresolved column, a date/time column, or no matching rows.

Instance member CopyRows(flagsOn, flagsOff)

Copies matching rows to the clipboard as tab-separated fields and CRLF-separated records.

ParameterTypeDescription
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberRow flags that must all be absent.

Returns: SalBoolean. True when a nonempty text block is submitted to the clipboard helper; false when there is no text to copy.

Instance member CreateColumn(colPos, dispWidth, maxChars, title)

Creates a dynamic string column.

ParameterTypeDescription
colPosSalNumberThe requested display position.
dispWidthSalNumberThe width in horizontal form units.
maxCharsSalNumberThe maximum text length.
titleSalStringThe column caption.

Returns: SalNumber. The new SAL column identifier.

Instance member CreateColumn(colPos, dispWidth, maxChars, title, dataType)

Creates a dynamic column with an explicit data type.

ParameterTypeDescription
colPosSalNumberThe requested display position.
dispWidthSalNumberThe width in horizontal form units.
maxCharsSalNumberThe maximum text length.
titleSalStringThe column caption.
dataTypeDataTypeThe value type of the new column.

Returns: SalNumber. The new SAL column identifier.

Instance member CreateColumnEx(colPos, dispWidth, title, maxChars, dataType)

Creates a dynamic column using a numeric SAL data-type code.

ParameterTypeDescription
colPosSalNumberThe requested display position.
dispWidthSalNumberThe width in horizontal form units.
titleSalStringThe column caption.
maxCharsSalNumberThe maximum text length.
dataTypeSalNumberThe SAL data-type code converted to DataType.

Returns: SalNumber. The new SAL column identifier.

Instance member CreateColumnFromClass(className, position)

Instantiates a named SalTableColumn subclass and adds it as a dynamic column.

ParameterTypeDescription
classNameSalStringThe type name resolved against the entry assembly.
positionSalNumberThe requested display position; negative values leave the appended position unchanged.

Returns: SalTableColumn. The new column, or null when the type is unresolved or is not a SalTableColumn subclass.

Instance member DefineRowHeader(title, width, flags, column)

Configures the row-header caption, width, flags, and optional mirrored column.

ParameterTypeDescription
titleSalStringThe row-header caption.
widthSalNumberThe row-header width in pixels.
flagsSalNumberThe Sys.TBL_RowHdr_* display flags.
columnControlThe column to mirror; a column from another table is resolved by its identifier in this table.

Returns: SalBoolean. Always true after applying the settings.

Instance member DefineSplitWindow(rows, resizable)

Creates or resizes the split grid, or removes it for a nonpositive row count.

ParameterTypeDescription
rowsSalNumberThe desired visible split-row count; zero or less removes the split.
resizableSalBooleanWhether the split separator can be dragged.

Returns: SalBoolean. Always true after processing.

Instance member DeleteRow(rowNum, flag)

Removes or logically deletes a table row and updates row context.

ParameterTypeDescription
rowNumSalNumberThe SAL context row to delete.
flagSalNumberSys.TBL_NoAdjust physically removes the row; other values mark it deleted and hidden.

Returns: SalBoolean. True when deletion succeeds; false for an absent, already deleted, or validation-blocked row.

Instance member DeleteSelected(hSql)

Executes the prepared SQL command for selected existing rows and marks selected rows deleted.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared delete-command handle; new rows skip SQL execution.

Returns: SalBoolean. False when SQL execution fails; otherwise, true.

Instance member DeleteSelected(hSql, errorHandler)

Deletes selected rows within a temporary SQL error-handler context.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared delete-command handle; new rows skip SQL execution.
errorHandlerWhenSqlErrorHandlerThe callback active during SQL operations.

Returns: SalBoolean. False when SQL execution fails; otherwise, true.

Instance member DestroyColumns()

Stops population and removes all rows and columns only when every column is dynamic.

Returns: SalBoolean. True when no columns exist or all dynamic columns are destroyed; false if any static column prevents destruction.

Population is stopped even when a static column prevents removal.

Instance member DestroyWindow()

Closes this window when it is a form, or disposes the control.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

A true result reports that the close or disposal request was made; a form can apply its own closing behavior.

Instance member DisableWindow()

Disables input to this control, or clears editability for a table column.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member DisableWindowAndLabel()

Disables input to this control and disables its associated label.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member DoDeletes(hSql, flagsOn)

Executes a prepared delete command for matching existing rows and marks matching rows deleted.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared SQL handle, using each matching row as context.
flagsOnSalNumberAt least one required row flag, or zero to include all nondeleted rows.

Returns: SalBoolean. False at the first failed execution; otherwise, true.

New rows are deleted locally without SQL execution. Earlier successful operations are retained if a later row fails.

Instance member DoDeletes(hSql, flagsOn, errorHandler)

Processes matching row deletions within a temporary SQL error-handler context.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared delete-command handle.
flagsOnInt32At least one required row flag, or zero for no inclusion filter.
errorHandlerWhenSqlErrorHandlerThe callback active during SQL operations.

Returns: SalBoolean. False at the first failed execution; otherwise, true.

Instance member DoInserts(hSql, clearFlags)

Executes the prepared command with each new row as context.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared insert-command handle.
clearFlagsSalBooleanTrue to clear ROW_New and ROW_Edited after each successful execution.

Returns: SalBoolean. False at the first failed execution; otherwise, true.

When rows are processed, context remains on the last attempted row.

Instance member DoInserts(hSql, clearFlags, errorHandler)

Processes new-row inserts within a temporary SQL error-handler context.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared insert-command handle.
clearFlagsSalBooleanTrue to clear new and edited flags after each successful execution.
errorHandlerWhenSqlErrorHandlerThe callback active during SQL operations.

Returns: SalBoolean. False at the first failed execution; otherwise, true.

Instance member DoUpdates(hSql, clearFlags)

Executes the prepared command with each edited, nonnew row as context.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared update-command handle.
clearFlagsSalBooleanTrue to clear ROW_Edited after each successful execution.

Returns: SalBoolean. False at the first failed execution; otherwise, true.

When rows are processed, context remains on the last attempted row.

Instance member DoUpdates(hSql, clearFlags, errorHandler)

Processes edited-row updates within a temporary SQL error-handler context.

ParameterTypeDescription
hSqlSalSqlHandleThe prepared update-command handle.
clearFlagsSalBooleanTrue to clear the edited flag after each successful execution.
errorHandlerWhenSqlErrorHandlerThe callback active during SQL operations.

Returns: SalBoolean. False at the first failed execution; otherwise, true.

Instance member EnableWindow()

Enables input to this control, or enables editing for a table column.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

For text-box controls, this operation also clears the read-only setting.

Native disabled styles are also cleared. When needed, tab navigation is restored except for unchecked radio buttons.

Instance member EnableWindowAndLabel()

Enables input to this control and enables its associated label.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member FetchRow(rowNum)

Fetches through the requested row as needed, dispatches SAL fetch actions, and sets context on success.

ParameterTypeDescription
rowNumSalNumberThe requested SAL row context.

Returns: SalNumber. Sys.TBL_RowFetched, Sys.TBL_RowDeleted, or Sys.TBL_NoMoreRows.

Instance member FindChild(windowName)

Searches this window for a child control by name.

ParameterTypeDescription
windowNameSalStringThe child control name to locate.

Returns: SalWindowHandle. The matching child handle, or a null SAL handle if no child is found.

Instance member FindNextRow(rowNum, flagsOn, flagsOff)

Finds the next matching nondeleted row, continuing from split rows into the main grid.

ParameterTypeDescription
rowNum by referenceSalNumberThe starting context row; receives the match on success and remains unchanged on failure. TBL_MinRow starts before the first row.
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberRow flags that must all be absent.

Returns: SalBoolean. True when a row is found; otherwise, false.

Example:

Collect selected, visible row contexts without changing the current row context.

using PPJ.Runtime;
using PPJ.Runtime.Windows;
using System.Windows.Forms;

public static class SelectionExample
{
public static System.Collections.Generic.List<SalNumber> SelectedRows(
SalTableWindow table)
{
var rows = new System.Collections.Generic.List<SalNumber>();
SalNumber row = Sys.TBL_MinRow;
while (table.FindNextRow(ref row, Sys.ROW_Selected, Sys.ROW_Hidden))
rows.Add(row);
return rows;
}
}

Instance member FindPrevRow(rowNum, flagsOn, flagsOff)

Finds a matching nondeleted row before the supplied context.

ParameterTypeDescription
rowNum by referenceSalNumberThe starting context row; receives the match on success and remains unchanged on failure.
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberRow flags that must all be absent.

Returns: SalBoolean. True when a row is found; otherwise, false.

Instance member FireWindowActions(msg, mywParam, mylParam)

Invokes this control's SAL action handlers directly and returns their result.

ParameterTypeDescription
msgSalNumberThe action message code.
mywParamSalNumberThe first action parameter.
mylParamSalNumberThe second action parameter.

Returns: SalNumber. The result stored in the dispatched action arguments.

Instance member FireWindowActionsToChildren(nMsg, nMywParam, nMylParam)

Dispatches a SAL action directly to eligible child controls and descendants.

ParameterTypeDescription
nMsgInt32The action message code.
nMywParamSalNumberThe first action parameter.
nMylParamSalNumberThe second action parameter.

Returns: SalBoolean. True after dispatching; false for an unavailable or disposed target.

Traversal does not descend into embedded forms or user controls.

Instance member FormUnitsToPixels(formUnits, vertical)

Converts a length in form units to pixels using this control's form metrics.

ParameterTypeDescription
formUnitsSalNumberThe length in form units.
verticalSalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: SalNumber. The converted pixel length.

Static member FromControl(ctrl)

Gets a table control directly or from a SalFormTableWindow wrapper.

ParameterTypeDescription
ctrlControlThe control or form to inspect.

Returns: SalTableWindow. The table, or null for any other control type.

Instance member GetClassName()

Gets the translated application class name associated with this control.

Returns: SalString. The class name, an empty string for a runtime-defined class, or a null SAL string for an unresolved or native control.

Forms use their base type; nested table-window types are walked upward to a non-nested type.

Instance member GetColumnFromId(colId)

Resolves a SAL column identifier to its column control.

ParameterTypeDescription
colIdInt32The SAL column identifier.

Returns: SalTableColumn. The column, or null when unresolved.

Instance member GetColumnFromPos(colPos)

Resolves a physical grid-column position to its SAL column control.

ParameterTypeDescription
colPosInt32The native grid-column index, including fixed columns in the indexing scheme.

Returns: SalTableColumn. The associated SAL column, or null when unresolved.

Instance member GetColumnText(colId, text)

Copies a column value from the current row context.

ParameterTypeDescription
colIdSalNumberThe SAL column identifier.
text by referenceSalStringReceives formatted cell text, binary-string data for a binary column, or an empty string for an unresolved column.

Returns: SalBoolean. Always true.

Instance member GetColumnText(colId)

Gets a column value from the current row context.

ParameterTypeDescription
colIdSalNumberThe SAL column identifier.

Returns: SalString. Formatted cell text, binary-string data for a binary column, or an empty string for an unresolved column.

Instance member GetColumnWindow(nCol, nFlags)

Resolves a column handle by identifier or physical grid position.

ParameterTypeDescription
nColSalNumberThe column identifier or native grid index.
nFlagsSalNumberSys.COL_GetPos selects position lookup; other values select identifier lookup.

Returns: SalWindowHandle. The column handle, or a null SAL handle when unresolved.

Instance member GetContextRow()

Gets the SAL row context used for column-value access.

Returns: SalNumber. The current context-row value.

Instance member GetControlType()

Gets the SAL window type of this control.

Returns: SalNumber. The SAL Sys.TYPE_* code for the translated control.

Instance member GetFirstChild(typeMask)

Finds the first child matching a SAL window-type mask.

ParameterTypeDescription
typeMaskSalNumberThe SAL window types to include; zero matches no controls.

Returns: SalWindowHandle. The first matching child handle, or a null SAL handle when none matches.

Ordinary controls use tab order; table columns use their creation order, and MDI forms use their child-form collection.

Instance member GetFont(name, size, enhancement)

Reads the control font's family, point size, and style flags.

ParameterTypeDescription
name by referenceSalStringReceives the font family name.
size by referenceSalNumberReceives the size in points.
enhancement by referenceSalNumberReceives the combined Sys.FONT_Enh* style flags.

Returns: SalBoolean. True if a font was available; otherwise, false.

Instance member GetLabelText(sText, nMaxLength)

Copies the associated label text to a supplied variable.

ParameterTypeDescription
sText by referenceSalStringReceives the label text when it can be read.
nMaxLengthSalNumberThe maximum number of leading characters to copy.

Returns: SalNumber. The number of characters copied, or zero if no label text is available.

Instance member GetLabelText(nMaxLength)

Gets this control's associated label text.

ParameterTypeDescription
nMaxLengthSalNumberThe maximum number of leading characters to return.

Returns: SalString. The label text limited to the requested length, or an empty string if no label exists.

Instance member GetLinesPerRow(lines)

Copies the configured text-line count per row.

ParameterTypeDescription
lines by referenceSalNumberReceives LinesPerRow.

Returns: SalBoolean. Always true.

Instance member GetLinesPerRow()

Gets the configured text-line count per row.

Returns: SalNumber. The LinesPerRow setting.

Instance member GetLocation(x, y)

Reads this control's location in form units.

ParameterTypeDescription
x by referenceSalNumberReceives the horizontal location.
y by referenceSalNumberReceives the vertical location.

Returns: SalBoolean. Always true; an unresolved control produces zero coordinates.

Instance member GetLockedColumns()

Gets the main grid frozen-column count.

Returns: SalNumber. The frozen count reported by the underlying grid.

Instance member GetMergedRange(row, col, clip)

Resolves merging through the configured callback or an enclosing form table.

ParameterTypeDescription
rowInt32The native grid row index.
colInt32The native grid column index.
clipBooleanWhether the result should be clipped to the visible area.

Returns: CellRange. The custom range, or an empty range when no provider exists.

Instance member GetName(text)

Copies this control's name to the supplied variable.

ParameterTypeDescription
text by referenceSalStringReceives the control name when the operation succeeds.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member GetName()

Gets this control's name.

Returns: SalString. The control name, or an empty string if the control cannot be resolved.

Instance member GetNextChild(typeMask)

Finds the next sibling matching a SAL window-type mask.

ParameterTypeDescription
typeMaskSalNumberThe SAL window types to include; zero matches no controls.

Returns: SalWindowHandle. The next matching control handle, or a null SAL handle when none matches.

Instance member GetNextColumn(prev, forward)

Traverses columns in collection order.

ParameterTypeDescription
prevSalTableColumnThe reference column, or null to return the first column regardless of direction.
forwardBooleanTrue for the following column; false for the preceding column.

Returns: SalTableColumn. The neighboring column, or null at a boundary or for an unknown reference column.

Instance member GetParent()

Gets the SAL parent form, owner, or table container for this control.

Returns: SalWindowHandle. The parent window handle, or a null SAL handle if no parent can be resolved.

Instance member GetProperty(name, value)

Reads a SAL named property into a supplied variable.

ParameterTypeDescription
nameSalStringThe property name.
value by referenceSalStringReceives the value only when the property is found.

Returns: SalBoolean. True if a non-null property value was found; otherwise, false.

Instance member GetProperty(name)

Gets the value of a SAL named property.

ParameterTypeDescription
nameSalStringThe property name.

Returns: SalString. The property value, or a SAL null string if the value is unavailable.

Instance member GetRowFlags(rowNum, flags)

Tests whether a nondeleted row has any requested flag.

ParameterTypeDescription
rowNumSalNumberThe SAL row context.
flagsSalNumberThe flag mask; zero never matches.

Returns: SalBoolean. True when at least one bit matches; false for an absent or deleted row.

Instance member GetSize(width, height)

Reads this control's size in form units.

ParameterTypeDescription
width by referenceSalNumberReceives the width.
height by referenceSalNumberReceives the height.

Returns: SalBoolean. Always true; an unresolved control produces a zero size.

Instance member GetTableFlags(flags)

Checks whether every requested table flag is enabled.

ParameterTypeDescription
flagsSalNumberThe table flag mask.

Returns: SalBoolean. True when all bits are set, including a zero mask.

Instance member GetText(text, maxLen)

Copies this control's displayed text or long-string value to a SAL string.

ParameterTypeDescription
text by referenceSalStringReceives the retrieved text.
maxLenSalNumberThe maximum character count for ordinary text; ignored for a Sys.DT_LongString value.

Returns: SalNumber. The number of characters copied, or zero when no text is available.

Instance member GetText(maxLen)

Gets this control's displayed text or long-string value.

ParameterTypeDescription
maxLenSalNumberThe maximum character count for ordinary text; ignored for a Sys.DT_LongString value.

Returns: SalString. The retrieved text, or an empty string if the control cannot be resolved.

Instance member GetWindowColor(colorIndex)

Reads a window or cell color as a Win32 color value.

ParameterTypeDescription
colorIndexSalNumberThe Sys.COLOR_Index* color component to read.

Returns: SalNumber. The color encoded as a Win32 color value, or zero if the control is unavailable.

Transparent colors are reported as Sys.COLOR_None. Table-column window colors use the system window colors; cell colors use the column settings.

Instance member GetWindowState()

Gets the visibility and form-state classification of this window.

Returns: SalNumber. A Sys.Window_* state code; visible non-form controls report Sys.Window_Normal.

Instance member HideWindow()

Hides this control or table column.

Returns: SalBoolean. The visibility state before the operation, or false if the control cannot be resolved.

Instance member HideWindowAndLabel()

Hides this control and its associated label.

Returns: SalBoolean. The control's visibility before the operation, or false if it cannot be resolved.

Instance member HitTest(x, y, row, col, location)

Classifies a table point against rows, headers, locked columns, and the split area.

ParameterTypeDescription
xSalNumberThe horizontal client coordinate in pixels.
ySalNumberThe vertical client coordinate in pixels.
row by referenceSalNumberReceives the SAL row context, or TBL_Error when no row is hit.
col by referenceSalWindowHandleReceives the associated column handle, or a null handle.
location by referenceSalNumberReceives the combined Sys.TBL_XOver* and Sys.TBL_YOver* location flags.

Returns: SalBoolean. Always true after testing, including points outside data cells.

Instance member InsertRow(rowNum)

Inserts a fetched row marked ROW_New and makes it the current row context.

ParameterTypeDescription
rowNumSalNumberThe insertion context; use TBL_MaxRow to append. Out-of-range translated positions append, and header positions are clamped past fixed rows.

Returns: SalNumber. The new context row, or Sys.TBL_Error for a disposed grid or an argument error.

Instance member InvalidateWindow()

Invalidates this control and its child controls for repainting.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member IsDerivedFromClass(typeClass)

Tests this control's runtime type against an application base type.

ParameterTypeDescription
typeClassTypeThe type to test, including the framework's emulated inheritance relationships.

Returns: SalBoolean. True if the runtime type derives from the requested type; otherwise, false.

Instance member IsEnabled()

Determines whether this control accepts input.

Returns: SalBoolean. The enabled state, or the editable flag for a table column; false if the control cannot be resolved.

Instance member IsVisible()

Determines whether this control is visible.

Returns: SalBoolean. The visible state, or the visibility flag for a table column; false if the control cannot be resolved.

Instance member KillCellEdit()

Finishes editing and selects the current full row when an active data column exists.

Returns: SalBoolean. True if editing finishes; false if validation prevents completion.

Instance member KillFocusRow()

Removes cell focus rectangles from both grids.

Returns: SalBoolean. Always true after updating the grids.

Instance member KillTimer(idEvent)

Stops the native window timer with the specified identifier.

ParameterTypeDescription
idEventSalNumberThe timer identifier to remove.

Returns: SalBoolean. The native timer-removal result, or false if the control cannot be resolved.

Instance member MoveWindow(xOffset, yOffset)

Moves this control by an offset expressed in form units.

ParameterTypeDescription
xOffsetSalNumberThe horizontal offset to add to the current position.
yOffsetSalNumberThe vertical offset to add to the current position.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Protected member OnAfterResizeRow(grid, args)

Propagates the new row height according to RowSizingStyle and fetches the resulting visible range.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe resized row.

Protected member OnAfterRowColChange(grid, args)

Updates context and focus styling, dispatches SAL context, focus, and user-click actions, and starts eligible automatic editing.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe old and new ranges.

Protected member OnAfterScroll(grid, args)

Runs base scroll synchronization and fetches visible rows when the main grid scrolls downward.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe old and new visible ranges.

Protected member OnBeforeMouseDown(grid, args)

Caches the initial hit-test result before base mouse processing can alter grid layout.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsBeforeMouseDownEventArgsThe pending mouse input and cancellation state.

Protected member OnBeforeRowColChange(grid, args)

Finishes editing, sends focus-loss and row-validation actions, and restores focus when the cell change is canceled.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe proposed old and new ranges and cancellation state.

Protected member OnButtonClick(grid, args)

Sends SAM_Click with the native column index and current SAL row context.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell containing the button.

Protected member OnChangeEdit(grid, args)

Synchronizes row context, marks the cell modified and unvalidated, and dispatches SAM_AnyEdit.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsEventArgsThe edit-change event data.

Instance member OnChildEditWndProc(sender, edit, m)

Dispatches SAL mouse, keyboard, context-menu, and double-click actions for a cell editor.

ParameterTypeDescription
senderNativeWindowThe native editor-window hook.
editControlThe receiving editor control.
m by referenceMessageThe native message and result.

Returns: Boolean. True when processing should stop; otherwise, the base hook result.

Instance member OnChildGridWndProc(sender, grid, m)

Dispatches SAL mouse, keyboard, scroll, command, and double-click actions for a child grid.

ParameterTypeDescription
senderNativeWindowThe native grid-window hook.
gridC1FlexGridThe receiving grid.
m by referenceMessageThe native message and result.

Returns: Boolean. True when processing should stop; otherwise, the base hook result.

Protected member OnDrawCell(grid, args)

Replaces displayed data-cell text with password text for masked columns, except during measurement.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsOwnerDrawCellEventArgsThe cell, text, and drawing state.

Protected member OnFontChanged(e)

Recalculates column widths, row line heights, and header heights for the new font.

ParameterTypeDescription
eEventArgsThe font-change event data.

Instance member OnGotFocus(grid, lostFocusHandle)

Applies focused styling and sends SAM_SetFocus while avoiding duplicate notifications during mouse-driven cell changes.

ParameterTypeDescription
gridC1FlexGridThe grid receiving focus.
lostFocusHandleIntPtrThe previously focused native window.

Protected member OnHandleCreated(e)

Captures the base font and recalculates column-header heights after base handle initialization.

ParameterTypeDescription
eEventArgsThe handle-creation event data.

Protected member OnLeaveEdit(grid, args)

Closes combo drop-downs and validates unvalidated cell data before permitting editor exit.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell leaving edit mode.

Instance member OnLostFocus(grid, gotFocusHandle)

Applies inactive styling, clears cached hit testing, and sends SAM_KillFocus unless the containing form is closing.

ParameterTypeDescription
gridC1FlexGridThe grid losing focus.
gotFocusHandleIntPtrThe native window receiving focus.

Protected member OnMouseDown(grid, args)

Translates eligible left-button cell and header clicks into SAL actions and starts automatic editing when appropriate.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsMouseEventArgsThe mouse location, button, and click count.

Protected member OnResize(grid, args)

Fetches rows needed by the visible range when the main grid is resized.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsEventArgsThe resize event data.

Protected member OnRowChangeValidate(grid, args)

Sends SAM_RowValidate for the current nondeleted row and cancels navigation for a rejected or invalid destination.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe pending row change and cancellation state.

Protected member OnSetupEditor(grid, args)

Attaches the configured cell context menu after base editor setup, preferring the legacy menu over the menu strip.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell whose editor is being configured.

Protected member OnValidateEdit(grid, args)

Validates checkbox or ordinary cell values in the correct row context while preventing recursive validation.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsValidateEditEventArgsThe proposed cell value and validation state.

Protected member OnValidating(e)

Attempts to finish the current cell edit when focus leaves a live table and form.

ParameterTypeDescription
eCancelEventArgsThe validation event, canceled when cell editing cannot finish.

Instance member PasteRows()

Appends clipboard Unicode text as newline-separated rows and tab-separated visible-column values.

Returns: SalBoolean. True when text was available for processing, even if it contains no nonempty rows; false when text is unavailable or an exception is caught.

Hidden columns do not consume fields. Earlier inserted rows remain if a later operation fails.

Instance member PixelsToFormUnits(numPixels, vertical)

Converts a pixel length to form units using this control's form metrics.

ParameterTypeDescription
numPixelsSalNumberThe pixel length to convert.
verticalSalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: SalNumber. The converted length in form units.

Instance member Populate(hSql, select, method)

Executes a query and repopulates the table using immediate, demand-driven, or background filling.

ParameterTypeDescription
hSqlSalSqlHandleThe SQL handle used to prepare, execute, and fetch.
selectSalStringThe SQL statement, or an empty value to reuse a prepared statement.
methodSalNumberSys.TBL_FillNormal, TBL_FillAllBackground, or TBL_FillAll; an unrecognized combination defaults to filling all rows.

Returns: SalBoolean. False if preparation or execution fails; otherwise, the population result.

Existing rows and automatic columns are replaced. Columns can be generated from the result schema when no columns or INTO bindings are present.

Example:

Populate an initialized table using an already connected SQL handle. This example fetches all rows before returning.

using PPJ.Runtime;
using PPJ.Runtime.Windows;
using System.Windows.Forms;

public static class PopulationExample
{
public static bool LoadCustomers(SalTableWindow table, PPJ.Runtime.Sql.SalSqlHandle sql)
{
// CustomerId and CustomerName are columns in the application's database.
// With no existing columns or INTO bindings, result columns are generated.
return table.Populate(sql,
"SELECT CustomerId, CustomerName FROM Customers ORDER BY CustomerName",
Sys.TBL_FillAll);
}
}

Instance member Populate(hSql, select, method, errorHandler)

Repopulates the table within a temporary SQL error-handler context.

ParameterTypeDescription
hSqlSalSqlHandleThe SQL handle used to prepare, execute, and fetch.
selectSalStringThe statement, or an empty value to reuse the prepared statement.
methodSalNumberThe Sys.TBL_FillNormal, TBL_FillAllBackground, or TBL_FillAll population mode.
errorHandlerWhenSqlErrorHandlerThe SQL callback active during this call.

Returns: SalBoolean. False if preparation or execution fails; otherwise, the population result.

Example:

Populate an initialized table using an already connected SQL handle. This example fetches all rows before returning.

using PPJ.Runtime;
using PPJ.Runtime.Windows;
using System.Windows.Forms;

public static class PopulationExample
{
public static bool LoadCustomers(SalTableWindow table, PPJ.Runtime.Sql.SalSqlHandle sql,
PPJ.Runtime.Sql.WhenSqlErrorHandler onSqlError)
{
// CustomerId and CustomerName are columns in the application's database.
// With no existing columns or INTO bindings, result columns are generated.
return table.Populate(sql,
"SELECT CustomerId, CustomerName FROM Customers ORDER BY CustomerName",
Sys.TBL_FillAll, onSqlError);
}
}

Instance member PopulateFromXML(file, rootNode, tableNode, useSchema)

Clears table rows and loads XML records by matching field element names to column titles.

ParameterTypeDescription
fileSalStringThe XML file path.
rootNodeSalStringThe element name used to select records or the table container.
tableNodeSalBooleanTrue to use children of the first matching element as rows; false to use the matching elements themselves.
useSchemaSalBooleanTrue to add columns from the companion base-name_Schema.xsd file, resolved in the current directory.

Returns: SalBoolean. True after loading rows; false when no matching elements exist.

SAM_XMLRowDone is sent for each row. XML and file errors are traced and rethrown; rows can already have been cleared.

Instance member PostMessage(msg, mywParam, mylParam)

Posts a native Windows message to this control for asynchronous processing.

ParameterTypeDescription
msgSalNumberThe Windows or SAL message code.
mywParamSalNumberThe first message parameter.
mylParamSalNumberThe second message parameter.

Returns: SalBoolean. True if the native message was posted; false for an unavailable or disposed control, or if posting fails.

Protected member ProcessCmdKey(msg, keyData)

Applies table navigation for Tab, Shift+Tab, Enter, and Escape after base command-key processing.

ParameterTypeDescription
msg by referenceMessageThe keyboard message.
keyDataKeysThe key and modifier flags.

Returns: Boolean. True when base processing or table navigation handles the key; otherwise, false.

Instance member QueryFocusCell(rowNum, column)

Reads the current grid row and its enabled SAL column.

ParameterTypeDescription
rowNum by referenceSalNumberReceives the translated focused-row context.
column by referenceSalWindowHandleReceives the column handle, or a null handle when the active column is absent or disabled.

Returns: SalBoolean. Always true.

Instance member QueryRowHeader(title, maxTitle, width, flags, column)

Reads the row-header caption, size, flags, and mirrored column.

ParameterTypeDescription
title by referenceSalStringReceives the caption, or an empty string if no header exists.
maxTitleSalNumberThe maximum number of caption characters to copy.
width by referenceSalNumberReceives the header width in pixels, or zero if absent.
flags by referenceSalNumberReceives the row-header flag mask.
column by referenceSalWindowHandleReceives the mirrored column handle, or a null handle.

Returns: SalBoolean. Always true.

Instance member QueryScroll(position, minRange, maxRange)

Reads the main grid top-row position and current row range.

ParameterTypeDescription
position by referenceSalNumberReceives the top row relative to fixed headers.
minRange by referenceSalNumberReceives a nonnegative lower bound adjusted for deleted rows.
maxRange by referenceSalNumberReceives the final data-row index, or -1 for no data rows.

Returns: SalBoolean. Always true.

Instance member QuerySplitWindow(rows, resizable)

Reads the split grid visible row span and resize setting.

ParameterTypeDescription
rows by referenceSalNumberReceives the visible row span, or zero when no split exists.
resizable by referenceSalBooleanReceives the splitter enabled state, or false when no split exists.

Returns: SalBoolean. Always true.

Instance member QueryVisibleRange(minRange, maxRange)

Calculates the main grid visible row span, including estimated unused space below existing rows.

ParameterTypeDescription
minRange by referenceSalNumberReceives the nonnegative first visible data-row index.
maxRange by referenceSalNumberReceives the estimated last visible data-row index, which may exceed existing data.

Returns: SalBoolean. Always true.

Instance member ResetTable()

Stops population, finishes editing, and clears table rows while suppressing redraw.

Returns: SalBoolean. True after resetting; false when editing cannot finish.

Population is stopped even when validation prevents the reset.

Instance member ScrollRow(rowNum, column)

Fetches a requested row as needed and scrolls its cell into view.

ParameterTypeDescription
rowNumSalNumberThe requested SAL row context.
columnControlThe target column, or null for the first grid column.

Returns: SalBoolean. Always true after scrolling; a row that cannot be fetched falls back to the main grid header position.

Instance member ScrollRow(rowNum, column, flags)

Scrolls a fetched row to an edge or makes its cell visible.

ParameterTypeDescription
rowNumSalNumberThe requested SAL row context.
columnControlThe target column, or null for the first grid column.
flagsSalNumberSys.TBL_ScrollTop or TBL_ScrollBottom for edge placement; other values show the cell normally.

Returns: SalBoolean. Always true after scrolling; failure to fetch the row uses the main grid header position.

When forwarded through an emulated secondary base, this overload currently discards the flags.

Instance member SendMessage(msg, mywParam, mylParam)

Sends a native Windows message to this control synchronously.

ParameterTypeDescription
msgSalNumberThe Windows or SAL message code.
mywParamSalNumberThe first message parameter.
mylParamSalNumberThe second message parameter.

Returns: SalNumber. The native message result, or zero when the control is unavailable or disposed.

Instance member SendMessageToChildren(msg, mywParam, mylParam)

Sends a message to this control's child windows and eligible descendants.

ParameterTypeDescription
msgSalNumberThe Windows or SAL message code.
mywParamSalNumberThe first message parameter.
mylParamSalNumberThe second message parameter.

Returns: SalBoolean. True after dispatching; false when the parent is unavailable or disposed.

Traversal does not descend into embedded forms or user controls. Close and destroy messages for ordinary child controls are routed to their action handlers instead of their native window procedures.

Instance member SetColumnText(columnId, text)

Assigns text to a column in the current row context.

ParameterTypeDescription
columnIdSalNumberThe SAL column identifier.
textSalStringThe text to assign.

Returns: SalBoolean. True when the column resolves and assignment completes; otherwise, false.

Instance member SetContextMenu(sMenuName, nFlags)

Creates and assigns a context menu for this control.

ParameterTypeDescription
sMenuNameSalStringThe menu type name to resolve.
nFlagsSalNumberUse Sys.CM_TableCell to assign the table's cell-editor menu; otherwise, assign the control's context menu.

Returns: SalBoolean. True if a control and menu type resolve and the menu is created; otherwise, false.

When called during a SAL context-menu action, the created menu is also shown at the current mouse position.

Instance member SetContextMenu(menuType, flags)

Creates and assigns a context menu for this control.

ParameterTypeDescription
menuTypeTypeThe menu type to instantiate.
flagsSalNumberUse Sys.CM_TableCell to assign the table's cell-editor menu; otherwise, assign the control's context menu.

Returns: SalBoolean. True if a control and menu type resolve and the menu is created; otherwise, false.

When called during a SAL context-menu action, the created menu is also shown at the current mouse position.

Instance member SetContextRow(rowNum)

Changes the row context used by column-value access.

ParameterTypeDescription
rowNumSalNumberThe SAL context row, including the temporary-row code where supported.

Returns: SalBoolean. True when context changes successfully; false for an untranslatable, invalid, or deleted row.

Instance member SetCursor(resource, type)

Loads a cursor resource and assigns it to the requested role.

ParameterTypeDescription
resourceSalResourceCursorThe cursor resource to load.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.

Instance member SetCursor(resourceId, type)

Assigns a system cursor or a cursor identified by its native handle to the requested role.

ParameterTypeDescription
resourceIdInt32A Sys.CURSOR_* identifier, or a native cursor handle represented as an integer.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.

Instance member SetCursor(blob, type)

Loads a cursor from binary data and assigns it to the requested role.

ParameterTypeDescription
blobSalStringThe cursor file data stored in a SAL binary string.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.

Instance member SetCursorFile(file, type)

Loads a cursor file and assigns it to the requested role.

ParameterTypeDescription
fileSalStringThe cursor file path.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.

Instance member SetFlagsAnyRows(flags, on, flagsOn, flagsOff)

Changes flags on matching rows in both grids while preserving row context.

ParameterTypeDescription
flagsSalNumberThe row flags to change.
onSalBooleanTrue to set flags; false to clear them.
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberFlags that must be absent.

Returns: SalBoolean. True if at least one grid processes matching rows; false if no rows match or selection validation blocks all matching grids.

Instance member SetFocus()

Moves keyboard focus to this control, deferring the change when SAL validation is in progress.

Returns: SalWindowHandle. The previously focused managed control as a SAL handle, or a null handle if the target is unavailable, a table column, an ActiveX host, disabled, or hidden.

Instance member SetFocusCell(rowNum, column, editMin, editMax)

Focuses a cell and starts editing when its type and permissions allow it.

ParameterTypeDescription
rowNumSalNumberThe SAL row context.
columnControlThe SAL column; a missing column falls back to focusing the full row.
editMinSalNumberThe first selected text position, clamped to zero when negative.
editMaxSalNumberThe exclusive selection end; values below editMin select through the text end.

Returns: SalBoolean. True when focus processing succeeds, whether or not editing starts; false for resolution, fetching, validation, or selection failure.

Instance member SetFocusRow(rowNum)

Fetches and focuses a row without generating a programmatic SAM_Click notification.

ParameterTypeDescription
rowNumSalNumberThe SAL row context to focus.

Returns: SalBoolean. False when the row cannot be translated or fetched or editing cannot finish; otherwise, true after processing.

Instance member SetFont(name, size, enhancement)

Creates and assigns a font to this control.

ParameterTypeDescription
nameSalStringThe font family name.
sizeSalNumberThe font size in points.
enhancementSalNumberThe combined Sys.FONT_Enh* style flags.

Returns: SalBoolean. True if the font was created and assigned; otherwise, false.

Instance member SetLabelText(sText)

Assigns the text of this control's associated label.

ParameterTypeDescription
sTextSalStringThe label text to display.

Returns: SalBoolean. True if an associated label was found and updated; otherwise, false.

Instance member SetLinesPerRow(nLines)

Assigns the text-line count used for row sizing.

ParameterTypeDescription
nLinesSalNumberA line count from 1 through 32; other values are ignored.

Returns: SalBoolean. Always true, including ignored assignments.

Instance member SetLocation(x, y)

Sets this control's location in form units.

ParameterTypeDescription
xSalNumberThe new horizontal coordinate.
ySalNumberThe new vertical coordinate.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

For forms, this also selects manual startup positioning.

Instance member SetLockedColumns(locked)

Sets the frozen-column count in both grids.

ParameterTypeDescription
lockedSalNumberThe requested count, clamped from zero to the main grid column count.

Returns: SalBoolean. Always true after assignment.

Instance member SetProperty(name, value, length)

Assigns a SAL named property after limiting the value's length.

ParameterTypeDescription
nameSalStringThe property name.
valueSalStringThe value to assign.
lengthSalNumberThe number of leading characters to retain.

Returns: SalBoolean. True if the translated control implements the SAL window contract; otherwise, false.

Instance member SetRange(min, max)

Stops population and establishes a main-grid row range after finishing editing.

ParameterTypeDescription
minSalNumberThe minimum row; negative values leave the range unchanged.
maxSalNumberThe maximum row, or TBL_MaxRow for the filler unlimited mode. A value below min clears the data rows.

Returns: SalBoolean. False when editing cannot finish; otherwise, true.

Instance member SetRow(rowPos)

Navigates to the first, last, next, or previous visible row and gives it focus.

ParameterTypeDescription
rowPosSalNumberSys.TBL_SetFirstRow, TBL_SetLastRow, TBL_SetNextRow, or TBL_SetPrevRow.

Returns: SalNumber. The selected context row, or Sys.TBL_Error when navigation fails or the code is unsupported.

Moving to the last row fetches remaining data first.

Instance member SetRowFlags(rowNum, flags, on)

Changes flags for a nondeleted row while preserving row context.

ParameterTypeDescription
rowNumSalNumberThe SAL row context.
flagsSalNumberThe Sys.ROW_* flags to modify.
onSalBooleanTrue to enable flags; false to clear them.

Returns: SalBoolean. False for a missing or deleted row, or when selecting requires editing that cannot finish; otherwise, true.

Instance member SetSize(width, height)

Sets this control's dimensions in form units.

ParameterTypeDescription
widthSalNumberThe new width.
heightSalNumberThe new height.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member SetTableFlags(flags, on)

Sets or clears table flags, attempting to finish editing before applying them.

ParameterTypeDescription
flagsSalNumberThe Sys.TBL_Flag_* flags to modify.
onSalBooleanTrue to set the flags; false to clear them.

Returns: SalBoolean. Always true after applying flags, even if editing could not finish.

Instance member SetText(text)

Assigns the control's displayed text.

ParameterTypeDescription
textSalStringThe text to assign.

Returns: SalBoolean. True if the translated control exists and assignment completes; otherwise, false.

An empty string is passed as null when assigning combo-box text.

Instance member SetTimer(idEvent, elapseMilliSec)

Creates or updates a native window timer for this control.

ParameterTypeDescription
idEventSalNumberThe timer identifier.
elapseMilliSecSalNumberThe requested interval in milliseconds.

Returns: SalBoolean. True if the native timer was created; otherwise, false.

Instance member SetWindowColor(colorIndex, color)

Assigns a SAL window, table-cell, text, or transparent-image color.

ParameterTypeDescription
colorIndexSalNumberThe Sys.COLOR_Index* component to update.
colorSalNumberThe SAL color value.

Returns: SalBoolean. True for a recognized color index and resolved control, even when the component does not apply to that control; otherwise, false.

Cell colors apply to table columns; window colors apply to other controls. Transparent colors require the SAL picture-control contract.

Instance member ShowWindow()

Shows this control or table column.

Returns: SalBoolean. The visibility state before the operation, or false if the control cannot be resolved.

Instance member ShowWindowAndLabel()

Shows this control and its associated label.

Returns: SalBoolean. The control's visibility before the operation, or false if it cannot be resolved.

Instance member SortRows(colId, order)

Sorts by an enabled sortable column and synchronizes the main-grid row context.

ParameterTypeDescription
colIdSalNumberThe SAL column identifier.
orderSalNumberSys.TBL_SortDecreasing for descending order; other values sort ascending.

Returns: SalBoolean. True after sorting; false for a missing column or one without COL_EnableSort.

Instance member TrackPopupMenu(menuName, flags, x, y)

Creates and displays a temporary popup menu at screen coordinates.

ParameterTypeDescription
menuNameSalStringThe menu type name to resolve.
flagsSalNumberSAL TPM_* alignment and cursor-position flags; center alignment and TPM_ContextMenu are unsupported.
xSalNumberThe screen X coordinate, unless TPM_CursorX selects the cursor position.
ySalNumberThe screen Y coordinate, unless TPM_CursorY selects the cursor position.

Returns: SalBoolean. True after the popup is shown; false when the target or menu cannot be resolved.

The previous context menu is restored after display and the temporary menu is queued for disposal.

Instance member TrackPopupMenu(menuType, flags, x, y)

Creates and displays a temporary popup menu at screen coordinates.

ParameterTypeDescription
menuTypeTypeThe menu type to instantiate.
flagsSalNumberSAL TPM_* alignment and cursor-position flags; center alignment and TPM_ContextMenu are unsupported.
xSalNumberThe screen X coordinate, unless TPM_CursorX selects the cursor position.
ySalNumberThe screen Y coordinate, unless TPM_CursorY selects the cursor position.

Returns: SalBoolean. True after the popup is shown; false when the target or menu cannot be resolved.

The previous context menu is restored after display and the temporary menu is queued for disposal.

Instance member UpdateWindow()

Requests an update of this control.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member WinHelp(file, command, numData, strData)

Invokes the legacy Windows Help API for this control.

ParameterTypeDescription
fileSalStringThe help file path.
commandSalNumberThe Sys.HELP_* command.
numDataSalNumberThe numeric topic or index for HELP_Context and HELP_SetIndex.
strDataSalStringThe lookup text for HELP_Key.

Returns: SalBoolean. The native help result, or false for an empty file name.

Protected member WndProc(m)

Routes clipboard, focus, context-menu, and keyboard messages through table-specific handlers.

ParameterTypeDescription
m by referenceMessageThe native message and result.

Instance member WriteXMLandSchema(path, writeTypes)

Writes table data, its schema, or both to disk.

ParameterTypeDescription
pathSalStringThe XML output path; schema output uses the same directory and base name with _Schema.xsd appended.
writeTypesSalNumberSys.XML_Document, XML_Schema, or XML_DocAndSchema.

Returns: SalBoolean. True for a supported completed write; false for an unsupported write type.

Throws:

Instance member WriteXMLandSchemaEx(path, writeTypes, flagsOn, flagsOff)

Writes filtered main-grid rows and optional column schema to disk.

ParameterTypeDescription
pathSalStringThe XML output path; schema output uses the same directory and base name with _Schema.xsd appended.
writeTypesSalNumberSys.XML_Document, XML_Schema, or XML_DocAndSchema.
flagsOnSalNumberAt least one required row flag, or zero for no inclusion filter.
flagsOffSalNumberFlags that must be absent from exported rows.

Returns: SalBoolean. True for a supported completed write; false for an unsupported write type.

Throws:

Instance member Yield()

Dispatches one pending message for this window, or processes application messages when no window handle exists.

Message dispatch can reenter application code.

Events

Instance member MessageActions

SalMessageHandler Provides the legacy SAL message-handler event.

Use WindowActions for new handlers.

Instance member WindowActions

WindowActionsEventHandler Occurs when this control dispatches a SAL or custom window action.

Inherited By

NameDescription
SalQuickToolTipChildTableProvides a SAL child table with Quick Objects tooltip and status-text compatibility methods.

Implements

NameDescription
ISalControlProvides access to a SAL control's typed value, associated label, and modification state.
ISalWindowExposes SAL message dispatch and runtime metadata for child controls, forms, dialogs, and MDI windows.