# SalFormTableWindow

Namespace: **PPJ.Runtime.Windows**

Assembly: **PPJ.Runtime.49** (4.9.0.0)

Top level table window implementation.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SalFormTableWindow : SalForm, IEnumerable<SalTableRow>, IEnumerable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SalFormTableWindow
    Inherits SalForm
    Implements IEnumerable(Of SalTableRow), IEnumerable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SalFormTableWindow()

Constructs a SalFormWindow object.

## Properties

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AllowAutoEditing

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disables AutoEditing mode. When this mode is on, the grid automatically enters edit mode when a cell is selected. (Default: `False`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AllowFiltering

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disables the excel-style filtering feature. (Default: `False`)

Set the property [UseNativeTypes](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) 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.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AllowRowSizing

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Allow row sizing. (Default: `True`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AllowSorting

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disables automatic sorting on table columns. (Default: `False`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Columns

[SalTableColumnCollection](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md): Returns the collection of columns.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ExtendLastColumn

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disables the extension of the last column to fill the grid. (Default: `False`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FocusRowStyle

[FocusRowStyle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md): Enables/Disables the focus frame around the current row. (Default: `Thick`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Icon

[Icon](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.icon): Overrides the default Image property.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Item(id)

[SalTableColumn](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md): Returns the table column object with the specified column ID. The ID is 1-based.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Item(name)

[SalTableColumn](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md): Returns the table column object with the specified name.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)LinesPerRow

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Number of lines per row.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ReadOnly

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.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`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)RowSizingStyle

[RowsSizingStyle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md): Keeps all rows of the same height. (Default: `FreeSize`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ShowCellLabels

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Gets or sets whether the grid should display labels over cells whose contents are partially hidden. (Default: `False`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ShowCursor

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disables the arrow icon on the current row. (Default: `False`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ShowFocusRow

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disables the focus frame around the current row. (Default: `True`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)TableWindow

[SalTableWindow](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md): Returns the internal table window control.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Trimming

[StringTrimming](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.stringtrimming): Defines how to trim the content that doesn't fit the width of the cell. (Default: `None`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)UseNativeTypes

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.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.

### ![](/files/dBIrS7XBDGmrzmTRbSI6)UseVisualStyles

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Enables/Disabled drawing of columns and rows headers using the current visual style theme renderer. (Default: `False`)

### ![](/files/dBIrS7XBDGmrzmTRbSI6)VirtualMode

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.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`)

## Methods

### ![](/files/dBIrS7XBDGmrzmTRbSI6)AnyRows(nFlagsOn, nFlagsOff)

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

| Parameter     | Type                                                                         | Description |
| ------------- | ---------------------------------------------------------------------------- | ----------- |
| **nFlagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **nFlagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ClearSelection()

Deselects all rows of a table window.

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ColumnAverage(columnID, flagsOn, flagsOff)

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

| Parameter    | Type                                                                         | Description |
| ------------ | ---------------------------------------------------------------------------- | ----------- |
| **columnID** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ColumnSum(columnID, flagsOn, flagsOff)

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

| Parameter    | Type                                                                         | Description |
| ------------ | ---------------------------------------------------------------------------- | ----------- |
| **columnID** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CopyRows(flagsOn, flagsOff)

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

| Parameter    | Type                                                                         | Description |
| ------------ | ---------------------------------------------------------------------------- | ----------- |
| **flagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateColumn(columnPos, dispWidth, maxChars, title)

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

| Parameter     | Type                                                                         | Description |
| ------------- | ---------------------------------------------------------------------------- | ----------- |
| **columnPos** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **dispWidth** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **maxChars**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **title**     | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)CreateColumnEx(columnPos, dispWidth, title, maxChars, datatype)

Creates a table window column using a given data type at runtime. Allowed types are DT\_String, DT\_Number and DT\_DateTime

| Parameter     | Type                                                                         | Description |
| ------------- | ---------------------------------------------------------------------------- | ----------- |
| **columnPos** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **dispWidth** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **title**     | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **maxChars**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **datatype**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DefineRowHeader(title, width, flags, column)

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

| Parameter  | Type                                                                                | Description |
| ---------- | ----------------------------------------------------------------------------------- | ----------- |
| **title**  | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **width**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **flags**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **column** | [Control](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DefineSplitWindow(rowsLowerHalf, dragAdjust)

Splits a table window horizontally.

| Parameter         | Type                                                                          | Description |
| ----------------- | ----------------------------------------------------------------------------- | ----------- |
| **rowsLowerHalf** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **dragAdjust**    | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DeleteRow(row, flag)

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

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flag**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DeleteSelected(hSql)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

| Parameter | Type                                                                            | Description |
| --------- | ------------------------------------------------------------------------------- | ----------- |
| **hSql**  | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DeleteSelected(hSql, errorHandler)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

| Parameter        | Type                                                                                   | Description |
| ---------------- | -------------------------------------------------------------------------------------- | ----------- |
| **hSql**         | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DestroyColumns()

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](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DoDeletes(hSql, flagsOn)

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

| Parameter   | Type                                                                            | Description |
| ----------- | ------------------------------------------------------------------------------- | ----------- |
| **hSql**    | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOn** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)    |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DoDeletes(hSql, flagsOn, errorHandler)

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

| Parameter        | Type                                                                                   | Description |
| ---------------- | -------------------------------------------------------------------------------------- | ----------- |
| **hSql**         | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **flagsOn**      | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)           |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DoInserts(hSql, clearFlags)

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

| Parameter      | Type                                                                            | Description |
| -------------- | ------------------------------------------------------------------------------- | ----------- |
| **hSql**       | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **clearFlags** | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)   |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DoInserts(hSql, clearFlags, errorHandler)

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

| Parameter        | Type                                                                                   | Description |
| ---------------- | -------------------------------------------------------------------------------------- | ----------- |
| **hSql**         | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **clearFlags**   | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)          |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DoUpdates(hSql, clearFlags)

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

| Parameter      | Type                                                                            | Description |
| -------------- | ------------------------------------------------------------------------------- | ----------- |
| **hSql**       | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **clearFlags** | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)   |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)DoUpdates(hSql, clearFlags, errorHandler)

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

| Parameter        | Type                                                                                   | Description |
| ---------------- | -------------------------------------------------------------------------------------- | ----------- |
| **hSql**         | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **clearFlags**   | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)          |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FetchRow(row)

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

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FindNextRow(row, flagsOn, flagsOff)

| Parameter    | Type                                                                          | Description |
| ------------ | ----------------------------------------------------------------------------- | ----------- |
| **row**      | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **flagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)FindPrevRow(row, flagsOn, flagsOff)

| Parameter    | Type                                                                          | Description |
| ------------ | ----------------------------------------------------------------------------- | ----------- |
| **row**      | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **flagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetColumnText(columnID, text)

| Parameter    | Type                                                                          | Description |
| ------------ | ----------------------------------------------------------------------------- | ----------- |
| **columnID** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **text**     | [SalString&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetColumnText(columnID)

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

| Parameter    | Type                                                                         | Description |
| ------------ | ---------------------------------------------------------------------------- | ----------- |
| **columnID** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetColumnWindow(col, flags)

Gets the handle of a table window column.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **col**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flags** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalWindowHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetContextRow()

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](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetLinesPerRow(lines)

| Parameter | Type                                                                          | Description |
| --------- | ----------------------------------------------------------------------------- | ----------- |
| **lines** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetLinesPerRow()

Retrieves the height of a row in lines.

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetLockedColumns()

Retrieves the number of locked table window columns.

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetMergedRange(row, col, clip)

Overrides GetMergedRange to allow the SalTableWindow class to override the method.

| Parameter | Type                                                                  | Description |
| --------- | --------------------------------------------------------------------- | ----------- |
| **row**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)     |             |
| **col**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)     |             |
| **clip**  | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) |             |

**Returns:** [CellRange](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetRowFlags(row, flags)

Queries a row's flags.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flags** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)GetTableFlags(flags)

Tests the state of a table window's flags.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **flags** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)HitTest(x, y, row, col, flags)

| Parameter | Type                                                                                | Description |
| --------- | ----------------------------------------------------------------------------------- | ----------- |
| **x**     | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **y**     | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **row**   | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)       |             |
| **col**   | [SalWindowHandle&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flags** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)       |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)InsertRow(row)

Inserts a new blank row into a table window.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)KillCellEdit()

Takes a row out of edit mode and selects the row. This causes the row to receive both SAM\_Validate and SAM\_KillFocus messages.

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)KillFocusRow()

Turns off the table window's focus frame.

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)PasteRows()

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](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Populate(hSql, select, method)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.

| Parameter  | Type                                                                            | Description |
| ---------- | ------------------------------------------------------------------------------- | ----------- |
| **hSql**   | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **select** | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)    |             |
| **method** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)    |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Populate(hSql, select, method, errorHandler)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.

| Parameter        | Type                                                                                   | Description |
| ---------------- | -------------------------------------------------------------------------------------- | ----------- |
| **hSql**         | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **select**       | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)           |             |
| **method**       | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)           |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Populate(hSql, select)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.

| Parameter  | Type                                                                            | Description |
| ---------- | ------------------------------------------------------------------------------- | ----------- |
| **hSql**   | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **select** | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)    |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)Populate(hSql, select, errorHandler)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.

| Parameter        | Type                                                                                   | Description |
| ---------------- | -------------------------------------------------------------------------------------- | ----------- |
| **hSql**         | [SalSqlHandle](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **select**       | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)           |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)QueryFocusCell(row, col)

| Parameter | Type                                                                                | Description |
| --------- | ----------------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)       |             |
| **col**   | [SalWindowHandle&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)QueryRowHeader(title, maxTitle, width, flags, col)

| Parameter    | Type                                                                                | Description |
| ------------ | ----------------------------------------------------------------------------------- | ----------- |
| **title**    | [SalString&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)       |             |
| **maxTitle** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **width**    | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)       |             |
| **flags**    | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)       |             |
| **col**      | [SalWindowHandle&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)QueryScroll(position, minRange, maxRange)

| Parameter    | Type                                                                          | Description |
| ------------ | ----------------------------------------------------------------------------- | ----------- |
| **position** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **minRange** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **maxRange** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)QuerySplitWindow(rowsLowerHalf, dragAdjust)

| Parameter         | Type                                                                           | Description |
| ----------------- | ------------------------------------------------------------------------------ | ----------- |
| **rowsLowerHalf** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **dragAdjust**    | [SalBoolean&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)QueryVisibleRange(minRange, maxRange)

| Parameter    | Type                                                                          | Description |
| ------------ | ----------------------------------------------------------------------------- | ----------- |
| **minRange** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **maxRange** | [SalNumber&](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ResetTable()

Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ScrollRow(row, column, flags)

Scrolls a table window to the specified row and column.

| Parameter  | Type                                                                                | Description |
| ---------- | ----------------------------------------------------------------------------------- | ----------- |
| **row**    | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **column** | [Control](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control) |             |
| **flags**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)ScrollRow(row, column)

Scrolls a table window to the specified row and column.

| Parameter  | Type                                                                                | Description |
| ---------- | ----------------------------------------------------------------------------------- | ----------- |
| **row**    | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **column** | [Control](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetColumnText(columnID, text)

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

| Parameter    | Type                                                                         | Description |
| ------------ | ---------------------------------------------------------------------------- | ----------- |
| **columnID** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **text**     | [SalString](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetContextRow(row)

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.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetFlagsAnyRows(flags, set, flagsOn, flagsOff)

Sets or clears row flags.

| Parameter    | Type                                                                          | Description |
| ------------ | ----------------------------------------------------------------------------- | ----------- |
| **flags**    | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **set**      | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **flagsOn**  | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **flagsOff** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetFocusCell(row, column, editMin, editMax)

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.

| Parameter   | Type                                                                                | Description |
| ----------- | ----------------------------------------------------------------------------------- | ----------- |
| **row**     | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **column**  | [Control](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control) |             |
| **editMin** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |
| **editMax** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)        |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetFocusRow(row)

Sets a table window's focus frame row.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetLinesPerRow(lines)

Sets the height of a row in lines.

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **lines** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetLockedColumns(lockedColumns)

Sets the number of locked table window columns.

| Parameter         | Type                                                                         | Description |
| ----------------- | ---------------------------------------------------------------------------- | ----------- |
| **lockedColumns** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetRange(min, max)

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

| Parameter | Type                                                                         | Description |
| --------- | ---------------------------------------------------------------------------- | ----------- |
| **min**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **max**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetRow(rowPos)

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

| Parameter  | Type                                                                         | Description |
| ---------- | ---------------------------------------------------------------------------- | ----------- |
| **rowPos** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetRowFlags(row, flags, set)

Sets or clears a table window row's flags.

| Parameter | Type                                                                          | Description |
| --------- | ----------------------------------------------------------------------------- | ----------- |
| **row**   | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **flags** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **set**   | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SetTableFlags(flags, set)

Sets or clears a table window's flags.

| Parameter | Type                                                                          | Description |
| --------- | ----------------------------------------------------------------------------- | ----------- |
| **flags** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md)  |             |
| **set**   | [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

### ![](/files/dBIrS7XBDGmrzmTRbSI6)SortRows(columnID, order)

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

| Parameter    | Type                                                                         | Description |
| ------------ | ---------------------------------------------------------------------------- | ----------- |
| **columnID** | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |
| **order**    | [SalNumber](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md).

## Inherited By

| Name                                                                                          | Description                      |
| --------------------------------------------------------------------------------------------- | -------------------------------- |
| [SalQuickToolTipTableWindow](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) | Pushbutton with tool tip support |

## Implements

| Name                                                                          | Description                                                                        |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [ISalWindow](/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md) | All Sal windows (Child windows, Forms, Dialogs and MDIs) implement this interface. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desktop-api.iceteagroup.com/ppj.runtime.49/forms/ppj.runtime.windows.salformtablewindow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
