# TableWindow

The *SalTableWindow* control in the PPJ Framework for the Desktopm (WinForms) is a container control containing two *FlexGrid.NET* controls inside a *SplitContainer*. In the PPJ Framework for the Web (Wisej) it is a container control containing two *DtaGridView* controls inside a *SplitContainer*.

The inner grids can be accessed by the application simply by using the **MainGrid** and *SplitGrid* properties.

For the *SplitGrid* property it is necessary to check if it's null because unless the split grid is visible, the property returns null.

These two properties return a reference to the inner *FlexGrid.NET* or *DataGridView* controls and allow you to use all the features available in the underlying grid control.

{% hint style="danger" %}
Be very careful when using the inner grid directly because you may interfere with the SalTableWindow implementation.
{% endhint %}

## Columns Editor

Columns in the *SalTableWindow* control can be designed directly in the form using the special designer built-in the *PPJ.Runtime.Design* assembly.

The extended designer allows child column controls to be edited as if they were controls hosted in the form.

<div align="left"><img src="https://iceteagroup.com/docs/media/embim8.png" alt="Column selected in design mode"></div>

To select a column in design mode simply click on the column header. Clicking on the body of the table window selects the entire table window control in design mode.

Once the column is in design mode, it can be moved left or right by clicking on the arrows at the bottom of the column header, and it can be resized dragging the the resize hand in the middle of the right frame.

Column's properties and events are available in the Property Inspector like any other control. The only difference is that the name of the selected control is prefixed by the name of the table window. See picture below.

<div align="left"><img src="https://iceteagroup.com/docs/media/embim9.png" alt="Column&#x27;s Properties"></div>

There are also two additional options (verbs), visible in Picture "Column´s property", added by the designer: **Add** column and **Delete** column.

The "Add column" option opens a new dialog box that lists all known SalTableColumn classes and allows the developer to add a new column to the table window. The "Delete column" option removes the currently selected column. The "Add column" verb is also available in the Table Window's tasks box.

### Adding New Columns

New columns can be added by using the "Add column" verb, or by dragging the selected *SalTableColumn* class from the toolbox.

### Inner Table Window Class

The new designer is capable of serializing added/deleted columns directly into the child inner class that was generated by Ice Porter.

New table windows added after porting, are serialized in the parent form's *InitializeComponent()* instead of creating a child table class.

{% hint style="warning" %}
The columns designer for child table controls is disabled for code ported with Ice Porter prior to version 2.0.1042.x.&#x20;

If the file AssemblyInfo.cs doesn't have the attribute \[assembly: CodeVersion("2.0.1042.1790")] (or above version), the columns designer is not supported and is disabled.
{% endhint %}

### Visual Styles Support

When the application is running with Visual Styles enabled on a version of Windows that supports Visual Styles the SalTableWindow control can be configured to render the column and row headers using the current theme.

To enable visual style support on a child table window control, or on a table window form, set the [UseVisualStyles ](/general/ported-application/project-structure/visual-styles.md)property to true.

![Child TableWindow using Visual Styles](https://iceteagroup.com/docs/media/embim10.png)


---

# 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://docs.iceteagroup.com/general/framework/controls/tablewindow.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.
