# SalFormTableWindow

Namespace: **PPJ.Runtime.Windows**

Assembly: **PPJ.Web.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/qoQXnPICsjBVNBSqpOj9)SalFormTableWindow()

Constructs a SalFormWindow object.

## Properties

### ![](/files/qoQXnPICsjBVNBSqpOj9)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/qoQXnPICsjBVNBSqpOj9)AllowRowSizing

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

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

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

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

[SalTableColumnCollection](https://docs.wisej.com/extensions/ppj.web.49/controls/saltablewindow/ppj.runtime.windows.saltablecolumncollection.md): Returns the collection of columns.

### ![](/files/qoQXnPICsjBVNBSqpOj9)DisableSplitGrid

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Prevents the split grid from getting the focus while allowing for he horizontal scroll and column resizing. (Default: `False`)

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

[SalTableColumn](https://docs.wisej.com/extensions/ppj.web.49/controls/saltablewindow/ppj.runtime.windows.saltablecolumn.md): Returns the table column object with the specified column ID. The ID is 1-based.

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

[SalTableColumn](https://docs.wisej.com/extensions/ppj.web.49/controls/saltablewindow/ppj.runtime.windows.saltablecolumn.md): Returns the table column object with the specified name.

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

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

### ![](/files/qoQXnPICsjBVNBSqpOj9)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/qoQXnPICsjBVNBSqpOj9)RowSizingStyle

[RowsSizingStyle](https://docs.wisej.com/extensions/ppj.web.49/controls/saltablewindow/ppj.runtime.windows.rowssizingstyle.md): Keeps all rows of the same height. (Default: `FreeSize`)

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

[SalTableWindow](https://docs.wisej.com/extensions/ppj.web.49/controls/saltablewindow/saltablewindow/README.md): Returns the internal table window control.

## Methods

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

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)BeginUpdate()

Prevents the control from updating until the EndUpdate method is called.

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

Deselects all rows of a table window.

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ColumnAverage(nColumnID, nFlagsOn, nFlagsOff)

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnID** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ColumnSum(nColumnID, nFlagsOn, nFlagsOff)

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnID** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)CopyRows(nFlagsOn, nFlagsOff)

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)CreateColumn(nColumnPos, nDispWidth, nMaxChars, sTitle)

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

| Parameter      | Type                                                                                     | Description |
| -------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnPos** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nDispWidth** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nMaxChars**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **sTitle**     | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)CreateColumnEx(nColumnPos, nDispWidth, sTitle, nMaxChars, nDatatype)

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 |
| -------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnPos** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nDispWidth** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **sTitle**     | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md) |             |
| **nMaxChars**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nDatatype**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DefineRowHeader(sTitle, nWidth, nFlags, column)

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

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **sTitle** | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md) |             |
| **nWidth** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **column** | [Control](https://docs.wisej.com/api?q=wisej.web.control)                                |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DefineSplitWindow(nRowsLowerHalf, bDragAdjust)

Splits a table window horizontally.

| Parameter          | Type                                                                                       | Description |
| ------------------ | ------------------------------------------------------------------------------------------ | ----------- |
| **nRowsLowerHalf** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |
| **bDragAdjust**    | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DeleteRow(nRow, nFlag)

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

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlag** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

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

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

| Parameter | Type                                                                                             | Description |
| --------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**  | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

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

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

| Parameter        | Type                                                                                             | Description |
| ---------------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**         | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)               |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)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](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DoDeletes(hSql, nFlagsOn)

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

| Parameter    | Type                                                                                             | Description |
| ------------ | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**     | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **nFlagsOn** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)         |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DoDeletes(hSql, nFlagsOn, errorHandler)

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

| Parameter        | Type                                                                                             | Description |
| ---------------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**         | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **nFlagsOn**     | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)         |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)               |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DoInserts(hSql, bClearFlags)

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

| Parameter       | Type                                                                                             | Description |
| --------------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**        | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **bClearFlags** | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md)       |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DoInserts(hSql, bClearFlags, 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](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **bClearFlags**  | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md)       |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)               |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DoUpdates(hSql, bClearFlags)

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

| Parameter       | Type                                                                                             | Description |
| --------------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**        | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **bClearFlags** | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md)       |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)DoUpdates(hSql, bClearFlags, errorHandler)

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

| Parameter        | Type                                                                                             | Description |
| ---------------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **hSql**         | [SalSqlHandle](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **bClearFlags**  | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md)       |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)               |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)EndUpdate()

Resumes updating of the list view control after suspending it by the BeginUpdate method.

### ![](/files/qoQXnPICsjBVNBSqpOj9)FetchRow(nRow)

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 |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)FindNextRow(nRow, nFlagsOn, nFlagsOff)

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**      | [SalNumber&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)                |             |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)FindPrevRow(nRow, nFlagsOn, nFlagsOff)

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**      | [SalNumber&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)                |             |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetColumnText(nColumnID, sText)

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnID** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **sText**     | [SalString&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)                |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetColumnText(nColumnID)

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnID** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetColumnWindow(nCol, nFlags)

Gets the handle of a table window column.

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nCol**   | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalWindowHandle](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salwindowhandle.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)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](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetLinesPerRow(nLines)

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

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

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

Retrieves the height of a row in lines.

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

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

Retrieves the number of locked table window columns.

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetRowFlags(nRow, nFlags)

Queries a row's flags.

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**   | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetTableFlags(nFlags)

Tests the state of a table window's flags.

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)InsertRow(nRow)

Inserts a new blank row into a table window.

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)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](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

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

Turns off the table window's focus frame.

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)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](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)Populate(hSql, sSelect, nMethod)

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](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **sSelect** | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md)         |             |
| **nMethod** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)         |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)Populate(hSql, sSelect, nMethod, 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](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **sSelect**      | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md)         |             |
| **nMethod**      | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)         |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)               |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)Populate(hSql, sSelect)

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](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **sSelect** | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md)         |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)Populate(hSql, sSelect, 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](https://docs.wisej.com/extensions/ppj.web.49/sql/ppj.runtime.sql.salsqlhandle.md) |             |
| **sSelect**      | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md)         |             |
| **errorHandler** | [WhenSqlErrorHandler](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)               |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)QueryFocusCell(nRow, hWndCol)

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

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)QueryRowHeader(sTitle, nMaxTitle, nWidth, nFlags, hWndCol)

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **sTitle**    | [SalString&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)                |             |
| **nMaxTitle** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nWidth**    | [SalNumber&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)                |             |
| **nFlags**    | [SalNumber&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)                |             |
| **hWndCol**   | [SalWindowHandle&](/ppj.web.49/forms/ppj.runtime.windows.salformtablewindow.md)          |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)QueryScroll(nPosition, nMinRange, nMaxRange)

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

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)QuerySplitWindow(nRowsLowerHalf, bDragAdjust)

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

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)QueryVisibleRange(nMinRange, nMaxRange)

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

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

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

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

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ScrollRow(nRow, column, nFlags)

Scrolls a table window to the specified row and column.

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**   | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **column** | [Control](https://docs.wisej.com/api?q=wisej.web.control)                                |             |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ScrollRow(nRow, column)

Scrolls a table window to the specified row and column.

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**   | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **column** | [Control](https://docs.wisej.com/api?q=wisej.web.control)                                |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetColumnText(nColumnID, sText)

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnID** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **sText**     | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetContextRow(nRow)

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 |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetFlagsAnyRows(nFlags, bSet, nFlagsOn, nFlagsOff)

Sets or clears row flags.

| Parameter     | Type                                                                                       | Description |
| ------------- | ------------------------------------------------------------------------------------------ | ----------- |
| **nFlags**    | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |
| **bSet**      | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md) |             |
| **nFlagsOn**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |
| **nFlagsOff** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetFocusCell(nRow, column)

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 |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**   | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **column** | [Control](https://docs.wisej.com/api?q=wisej.web.control)                                |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetFocusRow(nRow)

Sets a table window's focus frame row.

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRow**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetLinesPerRow(nLines)

Sets the height of a row in lines.

| Parameter  | Type                                                                                     | Description |
| ---------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nLines** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetLockedColumns(nLockedColumns)

Sets the number of locked table window columns.

| Parameter          | Type                                                                                     | Description |
| ------------------ | ---------------------------------------------------------------------------------------- | ----------- |
| **nLockedColumns** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetRange(nMin, nMax)

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

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nMin**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nMax**  | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetRow(nRowPos)

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

| Parameter   | Type                                                                                     | Description |
| ----------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nRowPos** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetRowFlags(nRow, nFlags, bSet)

Sets or clears a table window row's flags.

| Parameter  | Type                                                                                       | Description |
| ---------- | ------------------------------------------------------------------------------------------ | ----------- |
| **nRow**   | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |
| **bSet**   | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetTableFlags(nFlags, bSet)

Sets or clears a table window's flags.

| Parameter  | Type                                                                                       | Description |
| ---------- | ------------------------------------------------------------------------------------------ | ----------- |
| **nFlags** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md)   |             |
| **bSet**   | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SortRows(nColumnID, nOrder)

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

| Parameter     | Type                                                                                     | Description |
| ------------- | ---------------------------------------------------------------------------------------- | ----------- |
| **nColumnID** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **nOrder**    | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

## Implements

| Name                                                                                                    | Description                                                                        |
| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [ISalWindow](https://docs.wisej.com/extensions/ppj.web.49/interfaces/ppj.runtime.windows.isalwindow.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://web-api.iceteagroup.com/ppj.web.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.
