SalTableWindow
PPJ.Runtime.Windows.SalTableWindow
Last updated
PPJ.Runtime.Windows.SalTableWindow
Last updated
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Runtime.49 (4.9.0.0)
Table Window Control
Constructs a SalTableWindow control.
Boolean: Enables/Disables AutoEditing mode. When this mode is on, the grid automatically enters edit mode when a cell is selected. (Default: False
)
Boolean: Enables/Disables the excel-style filtering feature. (Default: False
)
Set the property UseNativeTypes to true to be able to use the type-specific filters, otherwise the filters operate on the displayed value. When using native types in conjunction with a non-standard format or an edit mask that cannot be parsed to a native value, it is possible to lose the edited value when it cannot be parsed.
Boolean: Allow row sizing. (Default: False
)
Int32: Fill interval for the background filler, in milliseconds.
Int32: Number of rows to load on each interval
ContextMenu: Returns/Sets the context menu to use with the cell editor control. (Default: null
)
ContextMenuStrip: Returns/Sets the context menu to use with the cell editor control. (Default: null
)
CultureInfo: Returns/Sets the culture to use for this control. (Default: null
)
FocusRowStyle: Default value for the FocusRowStyle property.
GetMergedRangeDelegate: GetMergedRange
Boolean: Returns true if the SalTableWindow control is embedded and the columns are owned/parented by the container.
SalTableColumn: Returns the table column object with the specified column ID. The ID is 1-based.
SalTableColumn: Returns the table column object with the specified name.
Control: Returns/Sets the label associated with this control.
Int32: Number of lines per row. (Default: 1
)
Boolean: is modified
SalNamedProperties: Returns the collection of named properties.
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
)
RowsSizingStyle: Keeps all rows of the same height. (Default: FreeSize
)
Boolean: Returns or sets whether the grid tries to parse the edited value into the native type of the column. (Default: False
)
When using native types in conjunction with a non-standard format or an edit mask that cannot be parsed to a native value, it is possible to lose the edited value when it cannot be parsed.
Boolean: Enables or disables virtual mode. When virtual mode is on, the rows are fetched from the data source as they are scrolled into view. (Default: False
)
Determines whether any rows in the specified table window match certain flags. If you set flagsOn to zero (0) and flagsOff to zero (0), SalTblAnyRows returns TRUE if the table window contains any rows at all, regardless of their flags.
flagsOn
The flags that the row should have. You can combine ROW * flags using the OR (|) operator.
flagsOff
The flags that the row should not have. You can combine ROW * flags using the OR (|) operator.
Returns: SalBoolean. true if any
Autosizes the specified column.
colStart
colEnd
extraSpace
Brings a window to the top of all overlapping windows.
Returns: SalBoolean.
Centers a window. If the window is a top-level window, it centers it on the desktop. If the window is a child window, it centers it on top of its parent.
Returns: SalBoolean.
Clears a window's cursor.
type
Returns: SalBoolean.
Deselects all rows of a table window.
Returns: SalBoolean.
Computes the average of all column values or only specified column values in a table window.
columnId
flagsOn
flagsOff
Returns: SalNumber.
Computes the sum of all column values or only specified column values in a table window.
columnId
flagsOn
flagsOff
Returns: SalNumber.
Copies the contents of the specified table window rows to the Clipboard in text format. In the Clipboard, columns are delimited by TAB characters and rows are delimited by end-of-line characters. Set flagsOn to zero (0) and flagsOff to zero (0) to copy the entire table.
flagsOn
The flags that the row should have. You can combine ROW* flags using the OR (|) operator. NflagsOff Number. The flags that the row should not have. You can combine ROW* flags using the OR (|) operator.
flagsOff
The flags that the row should have. You can combine ROW* flags using the OR (|) operator.
Returns: SalBoolean. bool
Creates a table window column of string data type at runtime. When you return to design mode, destroys the column.
colPos
The Column Position
dispWidth
The display width of the column in pixels.
maxChars
The maximum number of characters that the column can contain.
title
The column title.
Returns: SalNumber. Column ID
Creates a table window column of string data type at runtime. When you return to design mode, destroys the column.
colPos
The Column Position
dispWidth
The display width of the column in pixels.
maxChars
The maximum number of characters that the column can contain.
title
The column title.
dataType
The SAL data type constant.
Returns: SalNumber. Column ID
Creates a table window column using a given data type at runtime. Allowed types are DT_String, DT_Number and DT_DateTime
colPos
dispWidth
title
maxChars
dataType
Returns: SalNumber. Column ID
Uses the specified class as a template to create a new column in a SalTableWindow.
className
The name of the column class to be used as a template.
position
The position in the grid or table where the new column where be inserted. 1 is the left-most position. -1 indicates to append the column to the end of the table.
Returns: SalTableColumn.
Defines the appearance and behavior of a table window's row header. The row header is a non-editable area on the left edge of a table window that displays information that stays displayed even when a user scrolls horizontally. A typical use of a row header is the display of row numbers.
title
The title of the row header column.
width
The width of the row header in pixels.
flags
The row header attributes.
column
The column that the row header mirrors. Whatever displays in the row header. If colId is 0, the row header is blank.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Splits a table window horizontally.
rows
resizable
Returns: SalBoolean.
Deletes a row from a table window but not from the database.
rowNum
The number of the row to delete.
flag
A constant used to coordinate a delete from the table window with a with a delete from a database result set. This parameter can be one of these values: TBL_Adjust, TBL_NoAdjust
Returns: SalBoolean. bool
Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.
hSql
Sql handle with the prepared DELETE statement
Returns: SalBoolean. bool
Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.
hSql
Sql handle with the prepared DELETE statement
errorHandler
Returns: SalBoolean. bool
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.
Destroys a form window, a top-level table window, or a modeless dialog box created with SalCreateWindow.
Returns: SalBoolean.
Disables keyboard and mouse input to a window. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.
Returns: SalBoolean.
Disables keyboard and mouse input to a window and grays out its associated label. A label is the label control that immediately precedes the window in the outline. The label control must have a mnemonic. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.
Returns: SalBoolean.
Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.
hSql
Sql handle with the prepared DELETE statement
flagsOn
uses row flags to determine which rows to delete. You can specify either of these flags: ROW Mark Deleted ROW Selected
Returns: SalBoolean. bool
Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.
hSql
Sql handle with the prepared DELETE statement
flagsOn
uses row flags to determine which rows to delete. You can specify either of these flags: ROW Mark Deleted ROW Selected
errorHandler
Returns: SalBoolean. bool
Applies a SQL INSERT statement to all the rows in a table window that have the ROW_New flag.
hSql
Sql handle with the prepared INSERT statement
clearFlags
Whether to reset the ROW New flag. If TRUE, clears the ROW New flag of each inserted row; if FALSE, does not clear the ROW New flag of each inserted row. This is useful for error handling; if an error occurs, you can rollback the transaction and try again.
Returns: SalBoolean. bool
Applies a SQL INSERT statement to all the rows in a table window that have the ROW_New flag.
hSql
Sql handle with the prepared INSERT statement
clearFlags
Whether to reset the ROW New flag. If TRUE, clears the ROW New flag of each inserted row; if FALSE, does not clear the ROW New flag of each inserted row. This is useful for error handling; if an error occurs, you can rollback the transaction and try again.
errorHandler
Returns: SalBoolean. bool
Applies a SQL UPDATE statement to all table window rows with the Row_Edited flag.
hSql
Sql handle with the prepared UPDATE statement
clearFlags
If TRUE, clears the Row Edited flag of each changed row; if FALSE, does not clear the Row Edited flag of each changed row. This is useful for error handling; if an error occurs, you can roll back the transaction and try again.
Returns: SalBoolean. bool
Applies a SQL UPDATE statement to all table window rows with the Row_Edited flag.
hSql
Sql handle with the prepared UPDATE statement
clearFlags
If TRUE, clears the Row Edited flag of each changed row; if FALSE, does not clear the Row Edited flag of each changed row. This is useful for error handling; if an error occurs, you can roll back the transaction and try again.
errorHandler
Returns: SalBoolean. bool
Enables keyboard and mouse input to a window.
Returns: SalBoolean.
Enables keyboard and mouse input to a window and enables its associated label as well. A label is the label control that immediately precedes the window in the outline.
Returns: SalBoolean.
Sends a SAM_FetchRow message to a table window if the specified row has not been already fetched.
rowNum
The row number.
Returns: SalNumber. Result
This function finds a child window of a given name in the specified window.
windowName
Returns: SalWindowHandle.
rowNum
flagsOn
flagsOff
Returns: SalBoolean.
rowNum
flagsOn
flagsOff
Returns: SalBoolean.
Dispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop.
msg
mywParam
mylParam
Returns: SalNumber.
Dispatches the specified message (Window Actions) directly to the children's WindowActions event handlers, without going through Windows message loop.
nMsg
nMywParam
nMylParam
Returns: SalBoolean.
Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size.
formUnits
The number of form units.
vertical
If the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.
Returns: SalNumber.
Casts the control to SalTableWindow. If the control is an instance of SalFormTableWindow, returns the inner table control.
ctrl
Target control on which to execute the call.
Returns: SalTableWindow.
Return the name of a window's class as a string.
Returns: SalString.
Gets the table window column control with the specified id.
colId
The column identifier.
Returns: SalTableColumn. SalTableColumn
Gets the table window column control at the specified position.
colPos
The column position.
Returns: SalTableColumn. SalTableColumn
colId
text
Returns: SalBoolean.
Gets data from a column of a table window's context row.
colId
Returns: SalString.
Gets the handle of a table window column.
nCol
nFlags
Returns: SalWindowHandle.
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. Context row
Returns an object's type.
Returns: SalNumber.
Returns the handle of the first child window of the specified type. You can use this function to get the handles of MDI child windows.
typeMask
One or more window types combined (using the OR (|) operator) to create a mask of child window types.
Returns: SalWindowHandle.
name
size
enhancement
Returns: SalBoolean.
sText
nMaxLength
Returns: SalNumber.
Retrieves the text of the label associated to a control. Important: The label control does not require a mnemonic for the functions listed above to operate.
nMaxLength
Returns: SalString.
lines
Returns: SalBoolean.
Retrieves the height of a row in lines.
Returns: SalNumber.
x
y
Returns: SalBoolean.
Retrieves the number of locked table window columns. Locked table window columns do not scroll horizontally; they are fixed to the left side of the table window. All other columns appear to scroll under the locked columns.
Returns: SalNumber. Number of locked columns
Overrides GetMergedRange to allow the SalTableWindow class to override the method.
row
col
clip
Returns: CellRange.
text
Returns: SalBoolean.
Gets the name of an object.
Returns: SalString.
Returns the handle of the next child window that matches a specified type.
typeMask
One or more window types combined (using the OR (|) operator) to create a mask of child window types.
Returns: SalWindowHandle.
Returns the next column in the columns collection in order of ID.
prev
forward
Returns: SalTableColumn.
Returns the handle of an object's parent window.
Returns: SalWindowHandle.
name
value
Returns: SalBoolean.
Gets the value of a named property.
name
Returns: SalString.
Queries a row's flags.
rowNum
The row number of the row whose flags you want to test.
flags
The row flags to test for. You can combine ROW* flags using the OR (|) operator.
Returns: SalBoolean. bool
width
height
Returns: SalBoolean.
Tests the state of a table window's flags.
flags
The table flags to test. You can combine TBL * flags using the OR (|) operator.
Returns: SalBoolean. True if any of the flags indicated by nFlags are set and FALSE otherwise.
text
maxLen
Returns: SalNumber.
Retrieves the text of a window.
maxLen
Returns: SalString.
Gets a window's color.
colorIndex
Returns: SalNumber.
Returns a window's current state.
Returns: SalNumber.
Hides a window.
Returns: SalBoolean.
Hides a window and its associated label.
Returns: SalBoolean.
x
y
row
col
location
Returns: SalBoolean.
Inserts a new blank row into a table window.
rowNum
The row number of the new row.
Returns: SalNumber. New row number
Causes a window to be repainted.
Returns: SalBoolean.
Determines whether a window is an instance of the specified class.
typeClass
Returns: SalBoolean.
Determines whether a window is enabled for mouse and keyboard input.
Returns: SalBoolean.
Determines whether a window is currently visible.
Returns: SalBoolean.
Ends edit mode in the current cell.
Returns: SalBoolean.
Turns off the table window's focus frame.
Returns: SalBoolean.
Destroys an object's system timer.
idEvent
Returns: SalBoolean.
Moves a window a given number of form units on the X and Y axes relative to its current position.
xOffset
yOffset
Returns: SalBoolean.
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. bool
Computes the number of form units based on the number of pixels. Form units are a unit of measurement used by functions that move and position objects. Form units are computed using physical units (pixels) in conjunction with a window's font sizes.
numPixels
vertical
If the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.
Returns: SalNumber.
Populates the table window with the result of the select.
hSql
select
method
Returns: SalBoolean.
Populates the table window with the result of the select.
hSql
select
method
errorHandler
Returns: SalBoolean.
Clears a table window or grid and then fills new rows with data from an XML document. Optionally uses an XML schema to set attributes in the table.
file
The name of the XML document file containing data to be used to populate the table.
rootNode
The name of the XML root node of the table, or the name of the XML node pertaining to a table row. See tableNode .
tableNode
If true, it means that the name specified in rootNode is the actual root node of the table, and this function should use the default name "row" as the name of the node for each table row. If false, it means that the name in rootNode is actually the name of a row node, and each node found with that name should be processed as a table window or grid row.
useSchema
Indicates whether to retrieve and use an XML schema for determining data types and attributes. If true, the schema is retrieved. If false, data is written into table window cells with the presumption that the table structure is already correct. Currently, useSchema cannot be specified true when tableNode is false.
Returns: SalBoolean. True if the function succeeds and FALSE if fails. Some failure conditions, such as an invalid file name or invalid root node name, may cause error message dialogs to be displayed.
After each row of data is populated, this function sends message SAM_XMLRowDone to the table window. If an error occurs during the read, then the data in the table may be incomplete and should not be relied upon. When useSchema is set to true, and if the table window's columns were created at design time, the length of each column's value will be the length assigned at design time. If the table window or grid has no design-time columns and they are being automatically created during the call to this function, then the length of each column's value will be the length that is specified in the XML schema. This raises the possibility of truncation, if the value of an element contains more characters than are specified by the design-time length or the XML schema length.
Posts the specified message to a window by adding nMsg to hWndReceiver's message queue.
msg
mywParam
mylParam
Returns: SalBoolean.
rowNum
column
Returns: SalBoolean.
title
maxTitle
width
flags
column
Returns: SalBoolean.
position
minRange
maxRange
Returns: SalBoolean.
rows
resizable
Returns: SalBoolean.
minRange
maxRange
Returns: SalBoolean.
Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.
Returns: SalBoolean.
Scrolls a table window to the specified row and column.
rowNum
The number of the row to scroll to. If you specify -1, only the column scrolls into view.
column
The table window column to scroll into view. If you specify 0, only the row scrolls into view.
Returns: SalBoolean.
Scrolls a table window to the specified row and column.
rowNum
The number of the row to scroll to. If you specify -1, only the column scrolls into view.
column
The table window column to scroll into view. If you specify 0, only the row scrolls into view.
flags
The position of the scroll row. Specify one of these: TBL_AutoScroll, TBL_ScrollBottom, TBL_ScrollTop.
Returns: SalBoolean.
Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.
msg
mywParam
mylParam
Returns: SalNumber.
Sends a message to all child items of a form window, dialog box, table window, or MDI window.
msg
mywParam
mylParam
Returns: SalBoolean.
Assigns data to a column of a table window's context row.
columnId
text
Returns: SalBoolean.
Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
sMenuName
nFlags
Returns: SalBoolean.
Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
menuType
flags
Returns: SalBoolean.
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.
rowNum
The row number of the new context row.
Returns: SalBoolean. bool
Sets a window's cursor.
resource
type
Returns: SalBoolean.
Sets a window's cursor.
resourceId
type
Returns: SalBoolean.
Sets a window's cursor from a string variable.
blob
type
Returns: SalBoolean.
Sets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.
file
type
Returns: SalBoolean.
Sets or clears row flags.
flags
The flags to change. You can combine flag values using the OR (|) operator.
on
Whether to set (TRUE) or clear (false) the specified flags.
flagsOn
The flags that the rows should have. You can combine flag values using the OR (|) operator. Set flagsOn to zero (0) and flagsOff to zero (0) to specify all rows.
flagsOff
The flags that the rows should not have. You can combine flag values using the OR (|) operator. Set flagsOn to zero (0) and flagsOff to zero (0) to specify all rows.
Returns: SalBoolean. bool
Sets the focus to a specified window.
Returns: SalWindowHandle.
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.
rowNum
The row that receives the edit focus.
column
The handle (or name) of the column that receives the edit focus.
editMin
The position of the left-most character. When used with nEditMax, this parameter lets the user select a portion of the cell text. nEditMin must be less than or equal to nEditMax. To select all the characters in a cell, specify zero (0) for this parameter and -1 for nEditMax.
editMax
The position of the right-most character. When used with nEditMin, this parameter lets the user select a portion of the cell text. nEditMax must be greater than or equal to nEditMin. To select all the characters in a cell, specify -1 for this parameter and zero (0) for nEditMin.
Returns: SalBoolean.
Sets a table window's focus frame row.
rowNum
The row number of the row to which to apply the focus frame.
Returns: SalBoolean. bool
Sets a window's font, font size, and font enhancements.
name
size
enhancement
Returns: SalBoolean.
Sets the text of the associated label control.
sText
Returns: SalBoolean.
Sets the height of a row in lines.
nLines
Returns: SalBoolean.
Moves a window to a new position (x, y) on the X and Y axes.
x
y
Returns: SalBoolean.
Sets the number of locked columns.
locked
Returns: SalBoolean. bool
Sets the value of a named property.
name
value
length
Returns: SalBoolean.
Defines the minimum and maximum rows (range) of a table.
min
The lower boundary of the table window.
max
The upper boundary of the table window. Setting nMin and nMax: nMin must be less than or equal to nMax. You can specify an empty table with the range 0, -1. You can specify a dynamic range with the values zero (0) TBLMaxRow , . determines the higher boundary when the application returns TBL_NoMoreRows from a SAM_FetchRow message, or from the return of the SAM_FetchDone message.
Returns: SalBoolean. bool
Sets the focus to the first, last, next, or previous row in a table window.
rowPos
The position of the focus row. Specify one of these values: TBL_SetFirstRow TBL_SetLastRow BL_SetNextRow TBL_SetPrevRow
Returns: SalNumber. rowNum
Sets or clears a table window row's flags.
rowNum
The row number of the row whose flags you want to set or clear.
flags
The row flags. You can combine any of the ROW* flags using the OR (|) operator.
on
Whether to set (TRUE) or clear (false) the specified flags.
Returns: SalBoolean. bool
Resizes a window.
width
height
Returns: SalBoolean.
Sets or clears a table window's flags.
flags
The table flags. You can combine any of the TBL_* flags using the OR (|) operator.
on
Whether to set (TRUE) or clear (false) the specified flags.
Returns: SalBoolean.
Sets the text of a window.
text
Returns: SalBoolean.
Creates a system timer for a given object. When a timer event occurs, sends SAM_Timer messages to the object in specified intervals. Timers are a limited global resource. Your application must check the value returned by SalTimerSet to verify that the timer was created.
idEvent
elapseMilliSec
Returns: SalBoolean.
Sets a window's color.
colorIndex
color
Returns: SalBoolean.
Makes a window visible.
Returns: SalBoolean.
Makes a window and its associated label visible. A label is the label control that immediately precedes the window in the outline.
Returns: SalBoolean.
Sorts the rows of a table window based on the values in one of the table window's columns.
colId
order
TBL SortDecreasing or TBL_SortIncreasing
Returns: SalBoolean.
Creates pop-up menus at runtime.
menuName
flags
x
y
Returns: SalBoolean.
Creates pop-up menus at runtime.
menuType
flags
x
y
Returns: SalBoolean.
Forces the update of a window.
Returns: SalBoolean.
Starts the Windows help system.
file
command
numData
strData
Returns: SalBoolean.
Writes the contents and properties of a table window to an XML file and/or a schema file.
path
The path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema".
writeTypes
One of the XML constants(XML_DocAndSchema, XML_Document ,XML_Schema), determining whether to write XML, schema, or both.
Returns: SalBoolean. True if the function succeeds.
If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.
Writes the contents and properties of a table window to an XML file and/or a schema file.
path
The path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema".
writeTypes
One of the XML constants(XML_DocAndSchema, XML_Document, XML_Schema), determining whether to write XML, schema, or both.
flagsOn
A combination of one or more of the row flags. Rows must have these flags on in order to be part of the output to XML.
flagsOff
A combination of one or more of the row flags. Rows must have these flags off in order to be part of the output to XML.
Returns: SalBoolean. True if the function succeeds.
If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.
Processes messages for this control.
SalMessageHandler Message Actions
WindowActionsEventHandler Window Actions
Child table window with tool tip support
All SAL controls implement this interface.
All Sal windows (Child windows, Forms, Dialogs and MDIs) implement this interface.