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.

Be very careful when using the inner grid directly because you may interfere with the SalTableWindow implementation.

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.

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.

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.

The columns designer for child table controls is disabled for code ported with Ice Porter prior to version 2.0.1042.x.

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.

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 property to true.

Last updated