Skip to main content

SalTableWindowBase

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.50 (5.0.0.0)

Provides grid layout, row context, styling, selection, and native event routing for SAL table controls.

public class SalTableWindowBase : UserControl

Example:

void Configure(PPJ.Runtime.Windows.SalTableWindowBase table)
{
table.ShowCursor = true;
table.FocusRowStyle = PPJ.Runtime.Windows.FocusRowStyle.Thin;
}

Properties

Instance member ActionType

ChangeCellAction: Gets or sets whether the pending cell change originates from code, the mouse, or the keyboard.

Instance member ActiveColumn

SalTableColumn: Gets the SAL column corresponding to the current grid column.

Instance member AllowDraggingLockedColumns

Boolean: Gets or sets whether locked columns may participate in drag reordering. (Default: False)

Instance member AllowSorting

Boolean: Gets or sets whether the main grid supports automatic single-column sorting. (Default: False)

Instance member AnchorRow

Int32: Gets the row index anchoring the current selection operation.

Instance member AutoScroll

Boolean: Gets false; container automatic scrolling assignments are ignored because the grids manage scrolling. (Default: False)

Instance member AutoScrollMargin

Size: Gets an empty size; container scroll-margin assignments are ignored.

Instance member AutoScrollMinSize

Size: Gets an empty size; container minimum-scroll-size assignments are ignored.

Instance member BackColor

Color: Gets or sets the table background, substituting the system window color for an empty color on a nonembedded table.

Instance member BackgroundImage

Image: Gets null; background image assignments are ignored. (Default: null)

Instance member ColHeader

Row: Gets the first fixed grid row used for column headers, or null when no fixed row exists.

Instance member Columns

SalTableColumnCollection: Gets the lazily constructed SAL column collection.

Instance member ContextRow

Int32: Gets or requests a change to the SAL row context used for column-value access.

Instance member CurrentGrid

C1FlexGrid: Gets the grid currently used for focus and navigation.

Instance member CurrentRow

Int32: Gets the stored current row index used by table navigation.

Instance member DefaultRowHeight

Int32: Gets or sets the main grid default row height in pixels; nonpositive assignments are ignored.

Instance member ExtendLastColumn

Boolean: Gets or sets whether the last column extends across unused horizontal space in both grids. (Default: True)

Instance member FocusRow

Int32: Gets or sets the SAL row corresponding to the focused grid row; unresolved assignments are ignored.

Instance member FocusRowStyle

FocusRowStyle: Gets or sets the focus-row frame thickness in both grids. (Default: Thick)

Instance member IsEmbedded

Boolean: Gets whether the table is hosted as an embedded form table; the base implementation returns false.

Instance member MainGrid

C1FlexGrid: Gets the primary ComponentOne grid.

Instance member Redraw

Boolean: Gets whether redraw is enabled or adjusts the nested redraw-suppression count.

Each false assignment begins an update and requires a matching true assignment. Redrawing resumes when the count returns to zero.

Instance member RowHeader

Column: Gets the first fixed grid column used for row headers, or null when no fixed column exists.

Instance member RowHeaderFlags

Int32: Gets or replaces the row-header flags and refreshes their display.

Instance member RowHeaderImages

ArrayList: Gets the mutable collection of custom row-header images, creating it on first access.

Instance member RowHeaderTitle

String: Gets or sets the caption of the main row-header column.

Instance member RowHeaderTitleAlign

HorizontalAlignment: Gets or sets an explicit horizontal alignment for the row-header title.

Instance member RowHeaderWidth

Int32: Gets or sets the row-header width in pixels, synchronizing the secondary grid when present.

Instance member Rows

SalTableRowCollection: Gets a new live view of the main grid data rows, excluding fixed headers.

Instance member ShowCellLabels

Boolean: Gets or sets whether both grids display labels revealing partially hidden cell contents. (Default: False)

Instance member ShowCursor

Boolean: Gets or sets whether a current-row arrow appears in both grids, widening the row header to at least 24 pixels when enabled. (Default: False)

Instance member ShowFocusRow

Boolean: Gets or sets whether a focus frame appears around the current row; enabling a hidden frame selects the thick style. (Default: True)

Instance member SplitGrid

C1FlexGrid: Gets the optional secondary grid, or null when the table is not split.

Instance member SplitRows

SalTableRowCollection: Gets a new live view of secondary-grid data rows, or null when no secondary grid exists.

Instance member Splitter

Splitter: Gets the control that separates the main and secondary grids.

Instance member TableFlags

Int32: Gets or replaces the SAL table flags and applies all supported table-style effects.

Instance member Trimming

StringTrimming: Gets or sets how normal cell text is trimmed when it exceeds cell bounds in either grid. (Default: None)

Instance member UseVisualStyles

Boolean: Gets or sets whether both grids use the system visual style instead of custom header drawing. (Default: False)

Methods

Instance member CanEditCell(grid, row, col)

Checks grid, row, column, visibility, and SAL column permissions for editing a cell.

ParameterTypeDescription
gridC1FlexGridThe target grid.
rowInt32The native row index.
colInt32The native column index.

Returns: Boolean. True only for an existing visible data cell with all editing permissions enabled.

Instance member CanMoveCell()

Attempts to finish editing the current grid cell before navigation.

Returns: Boolean. True if editing can finish; otherwise, false.

Protected member ClearSelectedColumns()

Clears selected columns in both grids when the main grid has selected columns.

Selection events, SAL messages, and repainting are suppressed during the change.

Protected member ClearSelectedRows()

Clears row selection in both grids while suppressing repainting and selection events.

Protected member ClearUnusedStyles()

Removes unreferenced styles from the main and optional secondary grids.

Protected member CreateHandle()

Initializes column positions before first native handle creation.

Instance member CreateSplitGrid(visibleRows, resizable)

Creates or resizes the secondary grid, synchronizing columns and installing native message hooks.

ParameterTypeDescription
visibleRowsInt32The positive number of rows used to calculate the requested split height.
resizableBooleanWhether the separator can be dragged.

Throws:

  • ArgumentException The requested row count is less than one and the main grid is not disposed.

Instance member DestroySplitGrid()

Returns context to the main grid, disposes the secondary grid and splitter, and restores main-grid scrollbars.

Protected member Dispose(disposing)

Unsubscribes from the static skin-change event before disposing the base control.

ParameterTypeDescription
disposingBooleanTrue to release managed resources; false during finalization cleanup.

Instance member FinishEditing(grid, cancel)

Closes any combo-box drop-down and asks the grid to finish or cancel editing.

ParameterTypeDescription
gridC1FlexGridThe grid containing the editor.
cancelBooleanTrue to cancel changes; false to finish editing normally.

Returns: Boolean. The grid editing-completion result.

Instance member GetCellStyle(column, row)

Gets the effective display style at a SAL column and row.

ParameterTypeDescription
columnSalTableColumnThe grid-backed SAL column.
rowInt32The SAL context row.

Returns: CellStyle. The display style, or null when the cell cannot be resolved.

Instance member GetCellStyleNew(column, row)

Gets or creates a writable cell style, copying framework-managed styles before modification.

ParameterTypeDescription
columnSalTableColumnThe grid-backed SAL column.
rowInt32The SAL context row.

Returns: CellStyle. The writable cell style, or null when the cell cannot be resolved.

Existing styles whose names begin with PPJ: are replaced with a cell-specific style that retains their settings.

Instance member GetColHeaderStyle(column)

Gets the effective fixed-cell style for a column header.

ParameterTypeDescription
columnSalTableColumnThe column to inspect.

Returns: CellStyle. The header display style, or null for a missing column or grid-column binding.

Instance member GetColHeaderStyleNew(column)

Gets or creates a writable fixed-cell style for a column header.

ParameterTypeDescription
columnSalTableColumnThe column to style.

Returns: CellStyle. The writable header style, or null for a missing column or grid-column binding.

Instance member GetCols(grid)

Gets a live grid column collection after checking disposal.

ParameterTypeDescription
gridC1FlexGridThe grid to inspect.

Returns: ColumnCollection. The grid column collection, including fixed columns.

Throws:

Instance member GetColStyle(column)

Gets the effective display style of a grid-backed SAL column.

ParameterTypeDescription
columnSalTableColumnThe column to inspect.

Returns: CellStyle. The display style, or null for a missing column or grid-column binding.

Instance member GetColStyleNew(column)

Gets or creates a writable column style and shares it with the split-grid column when present.

ParameterTypeDescription
columnSalTableColumnThe column to style.

Returns: CellStyle. The writable style, or null for a missing column or grid-column binding.

Instance member GetContextRowFromCode(rowCode)

Translates SAL boundary and temporary-row codes into context-row values.

ParameterTypeDescription
rowCodeInt32A context row or TBL_* row code.

Returns: Int32. The translated value; ordinary row indices pass through unchanged.

Instance member GetRowHeaderStyle(row)

Gets the effective fixed-cell style for a row header.

ParameterTypeDescription
rowInt32The SAL context row.

Returns: CellStyle. The row-header display style, or null when the context cannot be translated.

Instance member GetRowHeaderStyleNew(row)

Gets or creates a row-specific fixed-cell style for modifying its header.

ParameterTypeDescription
rowInt32The SAL context row.

Returns: CellStyle. The writable header style, or null when the context cannot be translated.

Instance member GetRows(grid)

Gets a live grid row collection after checking disposal.

ParameterTypeDescription
gridC1FlexGridThe grid to inspect.

Returns: RowCollection. The grid row collection, including fixed rows.

Throws:

Instance member GetRowStyle(row)

Gets the effective display style for a row.

ParameterTypeDescription
rowInt32The SAL context row.

Returns: CellStyle. The display style, or null if the context cannot be translated.

Instance member GetRowStyleNew(row)

Gets or creates a row-specific style for modification.

ParameterTypeDescription
rowInt32The SAL context row.

Returns: CellStyle. The writable row style, or null when the context cannot be translated.

Instance member IsOnColumnMoveArea(grid, ht)

Checks the six-pixel drag strip at the bottom of a movable column header.

ParameterTypeDescription
gridC1FlexGridThe originating grid; the current implementation uses the table header properties.
htHitTestInfoThe hit-test result to inspect.

Returns: Boolean. True for an eligible column-header drag strip when column movement or design mode is enabled.

Instance member IsValidCol(grid, col)

Checks whether an index identifies a nonfixed column in a live table.

ParameterTypeDescription
gridC1FlexGridThe target grid.
colInt32The native column index.

Returns: Boolean. True for an existing nonfixed column; otherwise, false.

Protected member IsValidContextRow(rowNum)

Checks whether a SAL context row translates to an existing grid index.

ParameterTypeDescription
rowNumInt32The SAL context row or supported row code.

Returns: Boolean. True when translation succeeds; this does not reject deleted rows.

Instance member IsValidRow(grid, row)

Checks whether an index identifies a nonfixed row in a live table.

ParameterTypeDescription
gridC1FlexGridThe target grid.
rowInt32The native row index.

Returns: Boolean. True for an existing nonfixed row; otherwise, false.

Protected member OnAfterDragColumn(grid, args)

Mirrors column movement into the split grid.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsDragRowColEventArgsThe source column and destination position.

Protected member OnAfterEdit(grid, args)

Provides an override point after a cell edit completes.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe edited cell.

The base implementation performs no action.

Protected member OnAfterResizeColumn(grid, args)

Synchronizes the resized main-grid column width with its SAL control and split-grid counterpart.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe resized column indices.

Protected member OnAfterResizeRow(grid, args)

Provides an override point after a row is resized.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe resized row.

The base implementation performs no action.

Protected member OnAfterRowColChange(grid, args)

Updates the SAL row context and applies mouse- or keyboard-driven row-selection rules.

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

Protected member OnAfterScroll(grid, args)

Synchronizes horizontal scrolling across grids and raises a Windows Forms Scroll event.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe previously and currently visible ranges.

Protected member OnBackColorChanged(e)

Propagates the table background color to both grids.

ParameterTypeDescription
eEventArgsThe color-change event data.

Protected member OnBeforeDragColumn(grid, args)

Cancels dragging from or into the frozen column range unless locked-column dragging is enabled.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsDragRowColEventArgsThe proposed move and cancellation state.

Protected member OnBeforeMouseDown(grid, args)

Dispatches cell and header clicks and blocks double-click editing when the target is unsuitable.

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

Protected member OnBeforeRowColChange(grid, args)

Cancels a cell change when current editing cannot finish.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe proposed range change and cancellation state.

Protected member OnButtonClick(grid, args)

Provides an override point when a cell button is clicked.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell containing the clicked button.

The base implementation performs no action.

Protected member OnCausesValidationChanged(e)

Propagates the validation-trigger setting to both grids.

ParameterTypeDescription
eEventArgsThe setting-change event data.

Protected member OnChangeEdit(grid, args)

Forwards editor-content changes to the active SAL column.

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

Instance member OnChildEditWndProc(sender, edit, m)

Intercepts clipboard and focus messages for a native cell editor.

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

Returns: Boolean. The clipboard hook result for cut, paste, or clear; false for other messages.

Instance member OnChildGridWndProc(sender, grid, m)

Intercepts child-grid focus and mouse-movement messages.

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

Returns: Boolean. True when handled by a specialized hook; false to continue native processing.

Protected member OnComboCloseUp(grid, args)

Provides an override point when a cell combo list closes.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell whose combo list closes.

The base implementation performs no action.

Protected member OnComboDropDown(grid, args)

Provides an override point when a cell combo list opens.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell whose combo list opens.

The base implementation performs no action.

Protected member OnControlAdded(e)

Registers added SAL columns or redirects them to the enclosing form for embedded tables.

ParameterTypeDescription
eControlEventArgsThe added control.

Protected member OnControlRemoved(e)

Removes a departing SAL column from the live table before raising the base event.

ParameterTypeDescription
eControlEventArgsThe removed control.

Protected member OnDrawCell(grid, args)

Provides an override point for custom cell drawing.

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

The base implementation performs no action.

Protected member OnEnter(grid, args)

Provides an override point when a child grid is entered.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsEventArgsThe entry event data.

The base implementation performs no action.

Protected member OnEnterCell(grid, args)

Provides an override point when a cell is entered.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsEventArgsThe cell-entry event data.

The base implementation performs no action.

Protected member OnForeColorChanged(e)

Propagates foreground colors to normal and fixed cells in both grids.

ParameterTypeDescription
eEventArgsThe color-change event data.

Instance member OnGotFocus(grid, lostFocusHandle)

Applies focused highlight colors to both grids and raises the control focus event.

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

Protected member OnHandleCreated(e)

Initializes selection, native grid hooks, skin colors, and designer callbacks, then ends grid initialization.

ParameterTypeDescription
eEventArgsThe handle-creation event data.

Protected member OnHandleDestroyed(e)

Detaches the designer load-completion callback before base handle-destruction processing.

ParameterTypeDescription
eEventArgsThe handle-destruction event data.

Protected member OnKeyDownEdit(grid, args)

Routes editor keys through the SAL column and applies combo-box and popup-editor navigation rules.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsKeyEditEventArgsThe edited cell, key, and handled state.

Protected member OnKeyPressEdit(grid, args)

Forwards editor character input to the corresponding SAL column.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsKeyPressEditEventArgsThe edited cell, character, and handled state.

Protected member OnKeyUpEdit(grid, args)

Forwards editor key releases to the corresponding SAL column.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsKeyEditEventArgsThe edited cell, key, and handled state.

Protected member OnLeaveCell(grid, args)

Provides an override point when a cell is left.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsEventArgsThe cell-exit event data.

The base implementation performs no action.

Protected member OnLeaveEdit(grid, args)

Forwards editor-exit processing to the corresponding SAL column.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell leaving edit mode.

Protected member OnLoad(e)

Subscribes to application skin changes before raising the base load event.

ParameterTypeDescription
eEventArgsThe load event data.

Instance member OnLostFocus(grid, gotFocusHandle)

Applies inactive highlight colors to both grids and raises the control focus-loss event.

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

Protected member OnMouseDown(grid, args)

Clears the selection anchor for header clicks or records an anchor for mouse range selection.

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

Protected member OnMouseMove(grid, args)

Marks navigation as mouse-driven and updates the column-move cursor when capture is inactive.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsMouseEventArgsThe mouse location and button state.

Protected member OnMouseUp(grid, args)

Clears mouse-selection state and validates an eligible checkbox toggle in the focused cell.

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

Protected member OnResize(grid, args)

Provides an override point when a child grid is resized.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsEventArgsThe resize event data.

The base implementation performs no action.

Protected member OnRowChangeValidate(grid, args)

Provides an override point for validation before changing rows.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRangeEventArgsThe proposed range change and cancellation state.

The base implementation performs no action.

Protected member OnSetupEditor(grid, args)

Lets the SAL column configure the editor and installs its native message hook at run time.

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

Protected member OnSortColumn(grid, args)

Forwards column sorting to the corresponding SAL column.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsSortColEventArgsThe sorting request and column.

Protected member OnStartEdit(grid, args)

Clears row and column selection, rejects editing an unfocused cell, and lets the SAL column prepare the editor.

ParameterTypeDescription
gridC1FlexGridThe originating grid.
argsRowColEventArgsThe cell being edited and cancellation state.

Protected member OnValidateEdit(grid, args)

Provides an override point for validating a proposed cell value.

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

The base implementation performs no action.

Protected member ProcessCmdKey(msg, keyData)

Marks navigation as keyboard-driven when no mouse button is pressed, then performs base command-key processing.

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

Returns: Boolean. The base command-key result.

Instance member SelectFullRow(grid, row)

Selects a valid data row while suppressing selection events, then moves the grid column to zero.

ParameterTypeDescription
gridC1FlexGridThe target grid.
rowInt32The native grid row index.

Protected member SetContextRow(rowNum)

Changes the row context and current grid after validating the requested row.

ParameterTypeDescription
rowNumInt32The SAL context row, including TBL_TempRow where supported.

Returns: Boolean. True after setting context; false for an untranslatable, invalid, or deleted row.

Protected member SetFocusCellStyle(grid, editable)

Uses a light focus rectangle for editable cells and a solid rectangle for other cells.

ParameterTypeDescription
gridC1FlexGridThe grid whose focus style changes.
editableBooleanWhether the focused cell is editable.

Protected member TestRowFlags(row, maskOn, maskOff)

Tests a nondeleted row against inclusion and exclusion flag masks.

ParameterTypeDescription
rowSalTableRowThe row to test.
maskOnInt32At least one of these flags must be present; zero imposes no inclusion requirement.
maskOffInt32None of these flags may be present.

Returns: Boolean. True when the row exists, is not deleted, and satisfies both masks.

Instance member TestRowHeaderFlags(flags)

Checks whether all requested row-header flags are enabled.

ParameterTypeDescription
flagsInt32The flags to test.

Returns: Boolean. True when every bit is set, including an empty mask.

Instance member TestTableFlags(flags)

Checks whether all requested table flags are enabled.

ParameterTypeDescription
flagsInt32The flags to test.

Returns: Boolean. True when every bit is set, including an empty mask.

Instance member TranslateRowContext(rowNum, rowIndex, grid)

Resolves a SAL row context to the main or split grid and its native row index.

ParameterTypeDescription
rowNumInt32The SAL row context or supported row code.
rowIndex by referenceInt32Receives the native index after fixed header rows are accounted for.
grid by referenceC1FlexGridReceives the selected grid, initially the main grid even on failure.

Returns: Boolean. True when the translated index exists; false for a disposed main grid, absent split grid, or out-of-range index.

Instance member UpdateRowsHeight(grid, height)

Assigns a height to every nonfixed row in a grid while suppressing redraw.

ParameterTypeDescription
gridC1FlexGridThe grid whose rows are resized.
heightInt32The row height in pixels; positive values also update the main grid default height.

Inherited By

NameDescription
SalTableWindowDisplays SAL table rows and columns with window actions, cell editing, and row enumeration.
SalQuickToolTipChildTableProvides a SAL child table with Quick Objects tooltip and status-text compatibility methods.