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.
: Enables/Disables AutoEditing mode. When this mode is on, the grid automatically enters edit mode when a cell is selected. (Default: False
)
: Enables/Disables the excel-style filtering feature. (Default: False
)
Set the property 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.
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.
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.
Autosizes the specified column.
colStart
colEnd
extraSpace
Brings a window to the top of all overlapping windows.
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.
Clears a window's cursor.
type
Deselects all rows of a table window.
Computes the average of all column values or only specified column values in a table window.
columnId
flagsOn
flagsOff
Computes the sum of all column values or only specified column values in a table window.
columnId
flagsOn
flagsOff
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.
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.
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.
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
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.
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.
Splits a table window horizontally.
rows
resizable
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
Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.
hSql
Sql handle with the prepared DELETE statement
Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.
hSql
Sql handle with the prepared DELETE statement
errorHandler
Destroys all automatic columns created by SalTblCreateColumn or SalTblPopulate at runtime. This function only works on table windows that contain only automatic columns.
Destroys a form window, a top-level table window, or a modeless dialog box created with SalCreateWindow.
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.
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.
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
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
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.
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
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.
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
Enables keyboard and mouse input to a window.
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.
Sends a SAM_FetchRow message to a table window if the specified row has not been already fetched.
rowNum
The row number.
This function finds a child window of a given name in the specified window.
windowName
rowNum
flagsOn
flagsOff
rowNum
flagsOn
flagsOff
Dispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop.
msg
mywParam
mylParam
Dispatches the specified message (Window Actions) directly to the children's WindowActions event handlers, without going through Windows message loop.
nMsg
nMywParam
nMylParam
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.
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.
Return the name of a window's class as a string.
Gets the table window column control with the specified id.
colId
The column identifier.
Gets the table window column control at the specified position.
colPos
The column position.
colId
text
Gets data from a column of a table window's context row.
colId
Gets the handle of a table window column.
nCol
nFlags
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 an object's type.
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.
name
size
enhancement
sText
nMaxLength
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
lines
Retrieves the height of a row in lines.
x
y
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.
Overrides GetMergedRange to allow the SalTableWindow class to override the method.
row
col
clip
text
Gets the name of an object.
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 the next column in the columns collection in order of ID.
prev
forward
Returns the handle of an object's parent window.
name
value
Gets the value of a named property.
name
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.
width
height
Tests the state of a table window's flags.
flags
The table flags to test. You can combine TBL * flags using the OR (|) operator.
text
maxLen
Retrieves the text of a window.
maxLen
Gets a window's color.
colorIndex
Returns a window's current state.
Hides a window.
Hides a window and its associated label.
x
y
row
col
location
Inserts a new blank row into a table window.
rowNum
The row number of the new row.
Causes a window to be repainted.
Determines whether a window is an instance of the specified class.
typeClass
Determines whether a window is enabled for mouse and keyboard input.
Determines whether a window is currently visible.
Ends edit mode in the current cell.
Turns off the table window's focus frame.
Destroys an object's system timer.
idEvent
Moves a window a given number of form units on the X and Y axes relative to its current position.
xOffset
yOffset
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.
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.
Populates the table window with the result of the select.
hSql
select
method
Populates the table window with the result of the select.
hSql
select
method
errorHandler
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.
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
rowNum
column
title
maxTitle
width
flags
column
position
minRange
maxRange
rows
resizable
minRange
maxRange
Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.
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.
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.
Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.
msg
mywParam
mylParam
Sends a message to all child items of a form window, dialog box, table window, or MDI window.
msg
mywParam
mylParam
Assigns data to a column of a table window's context row.
columnId
text
Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
sMenuName
nFlags
Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
menuType
flags
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.
Sets a window's cursor.
resource
type
Sets a window's cursor.
resourceId
type
Sets a window's cursor from a string variable.
blob
type
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
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.
Sets the focus to a specified window.
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.
Sets a table window's focus frame row.
rowNum
The row number of the row to which to apply the focus frame.
Sets a window's font, font size, and font enhancements.
name
size
enhancement
Sets the text of the associated label control.
sText
Sets the height of a row in lines.
nLines
Moves a window to a new position (x, y) on the X and Y axes.
x
y
Sets the number of locked columns.
locked
Sets the value of a named property.
name
value
length
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.
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
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.
Resizes a window.
width
height
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.
Sets the text of a window.
text
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
Sets a window's color.
colorIndex
color
Makes a window visible.
Makes a window and its associated label visible. A label is the label control that immediately precedes the window in the outline.
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
Creates pop-up menus at runtime.
menuName
flags
x
y
Creates pop-up menus at runtime.
menuType
flags
x
y
Forces the update of a window.
Starts the Windows help system.
file
command
numData
strData
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.
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.
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.
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.
: Allow row sizing. (Default: False
)
: Fill interval for the background filler, in milliseconds.
: Number of rows to load on each interval
: Returns/Sets the context menu to use with the cell editor control. (Default: null
)
: Returns/Sets the context menu to use with the cell editor control. (Default: null
)
: Returns/Sets the culture to use for this control. (Default: null
)
: Default value for the FocusRowStyle property.
: GetMergedRange
: Returns true if the SalTableWindow control is embedded and the columns are owned/parented by the container.
: Returns the table column object with the specified column ID. The ID is 1-based.
: Returns the table column object with the specified name.
: Returns/Sets the label associated with this control.
: Number of lines per row. (Default: 1
)
: is modified
: Returns the collection of named properties.
: 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
)
: Keeps all rows of the same height. (Default: FreeSize
)
: Returns or sets whether the grid tries to parse the edited value into the native type of the column. (Default: False
)
: 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
)
Returns: . true if any
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: . Column ID
Returns: . Column ID
Returns: . Column ID
Returns: .
Returns: . TRUE if the function succeeds and FALSE if it fails.
Returns: .
Returns: . bool
Returns: . bool
Returns: . bool
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: . bool
Returns: . bool
Returns: . bool
Returns: . bool
Returns: . bool
Returns: .
Returns: .
Returns: . Result
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . SalTableColumn
Returns: . SalTableColumn
Returns: .
Returns: .
Returns: .
Returns: . Context row
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . Number of locked columns
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: .
Returns: . True if any of the flags indicated by nFlags are set and FALSE otherwise.
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . New row number
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: .
Returns: .
Returns: .
Returns: . 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.
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: .
Returns: .
Returns: . bool
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . bool
Returns: .
Returns: . bool
Returns: . rowNum
Returns: . bool
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: .
Returns: . True if the function succeeds.
Returns: . True if the function succeeds.
Message Actions
Window Actions