# Formatting a Grid

> Source: https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/formatting-a-grid

## Grid Format Definition

Once the grid control is placed on a panel, you can set properties to change the grid's appearance and functionality.

The **Grid Format Definition** dialogue is used to format the grid and specify grid cell attributes. It is invoked by clicking the *Format* button located on the **Attributes** and **Presets** panels of the **Grid Properties** dialogue.

![](https://manual.pvxplus.com/migration-assets/2645492a6037924548a9ab010a3084a6551f8a32570b98ce919b9a260c0dd697.jpg)

This dialogue consists of the following:

|  |  |
| --- | --- |
| *Title* | Title to appear above each column. Click the dotted button to invoke a separate dialogue to input a fixed value or expression or to reference a user-defined message. |
| *Width* | Click the dotted button to invoke a separate dialogue for entering the starting width of the column, either a fixed value or an expression. |
| *Alignment* | Select a text alignment from the drop-down list: *Left, Right, Center*. This alignment is applied to all the rows as they are added to the grid by default. |
| *Cell Type* | Click the drop-down arrow for a list of available cell types for the column. The various cell types are listed below. Default cell type is *Normal*.<br>\| **Cell Type** \| **Description** \|<br>\| --- \| --- \|<br>\| *Button* \| Cell works like a button if clicked. Cell can be changed if not locked (on double click). Set the **['Lock](https://manual.pvxplus.com/properties/lock)** property to 1 to achieve standard button behavior for cell. \|<br>\| *CheckBox* \| Check box with no 3D effect. \|<br>\| *CheckBoxRaised* \| 3D check box that looks raised. \|<br>\| *CheckBoxRecessed* \| 3D check box that looks recessed. \|<br>\| *CheckMark* \| Check box that uses a check mark. \|<br>\| *CheckMarkRaised* \| Raised check box that uses a check mark. \|<br>\| *CheckMarkRecessed* \| Recessed check box that uses a check mark. \|<br>\| *DropBox* \| A text cell that, when editing, allows the user to make a selection from a drop-down list. The drop list is loaded from the **['Text$](https://manual.pvxplus.com/properties/text)** property.<br>Drop boxes provide a multiple character search capability that makes it easier to search for an exact match in a drop box list. See **[Multiple Character Search](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/formatting-a-grid#search)**.<br>*(Multiple character search in drop boxes was added in PxPlus 2019.)* \|<br>\| *DropBoxHideBtn* \| Same as *DropBox*, but the drop-down button is shown only when focus is on the cell.<br>Drop boxes provide a multiple character search capability that makes it easier to search for an exact match in a drop box list. See **[Multiple Character Search](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/formatting-a-grid#search)**.<br>*(Multiple character search in drop boxes was added in PxPlus 2019.)* \|<br>\| *Ellipsis* \| Normal text cell that will show three dots (…) if text exceeds displayable area. **Ctrl - Enter** can be used to force a new line in the cell (inserts $0D0A$ into cell value). \|<br>\| *EllipsisDrop* \| Same as *Ellipsis*, but forces the cell to drop vertically only during an edit. **Ctrl - Enter** can be used to force a new line in the cell (inserts $0D0A$ into cell value). \|<br>\| *FlatButton* \| A flat button that shows no visible change when clicked.<br>*(Added in PxPlus 2014 Feature Pack 1 - Update 0001)* \|<br>\| *FlatButtonInOnly* \| A button that looks flat only when not depressed.<br>*(Added in PxPlus 2014 Feature Pack 1 - Update 0001)* \|<br>\| *FlatTextButton* \| Similar to *TextButton*, but the button is flat and shows no visible change when clicked.<br>*(Added in PxPlus 2014 Feature Pack 1 - Update 0001)* \|<br>\| *FlatTextButtonInOnly* \| Similar to *TextButton*, but the button looks flat only when not depressed.<br>*(Added in PxPlus 2014 Feature Pack 1 - Update 0001)* \|<br>\| *Lookup* \| Small button at the right side of the cell used to invoke a lookup. Button image is defined via the cell's **['Bitmap$](https://manual.pvxplus.com/properties/bitmap)** property. If no image is given, button shows three dots (…). \|<br>\| *LookupHideBtn* \| Same as *Lookup*, but indicates that the button is hidden when the cell is not selected. \|<br>\| *Multi_line* \| Normal text cell that can contain multiple lines of text. Press **Enter** or **Ctrl - Enter** to create a new line (value $0D0A$).<br>When the cell being edited contains multiple lines of text, the Up/Down arrow keys can be used to move within the lines of text. Pressing **Enter** twice consecutively exits the cell being edited.<br>*(Added the use of Enter and Up/Down arrow keys when editing a cell in PxPlus 2017 Update 0004)* \|<br>\| *Normal* \| Normal text cell that contains one line of data. \|<br>\| *Query* \| Same as *Lookup*, but the user is unable to edit the cell. \|<br>\| *QueryHideBtn* \| Same as *LookupHideBtn*, but the user is unable to edit the cell. \|<br>\| *SingleLine* \| Normal text cell that allows for a single line of entry, expanding the cell horizontally according to the overlap rules. It does not allow vertical expansion like a multi-line. \|<br>\| *TextButton* \| Similar to *Button*, except that the text on the button adheres to the **['Align$](https://manual.pvxplus.com/properties/align)** property and will wrap.<br>*(Added in PxPlus 2014 Feature Pack 1 - Update 0001)* \|<br>\| *UseTextEllipsis  <br>UseTextNormal  <br>UseTextSingleLine* \| Similar to *Ellipsis*, *Normal* and *SingleLine* respectively, except the value of **['Text$](https://manual.pvxplus.com/properties/text)** property is displayed. During input and editing, the **['Value$](https://manual.pvxplus.com/properties/value)** property is presented and entered into the cell. Sorting on a column is done using the 'Value$ property.<br>To sort a ***date*** column, set the cell type to *UseTextNormal*, and then write a sortable value to the cell's 'Value$ property and set the 'Text$ property to the value to be displayed. \|<br>\| *VarDropBox* \| A text cell that, when editing, allows the user to make a selection from a drop-down list or enter any other value. Drop list selections are loaded using the **['Text$](https://manual.pvxplus.com/properties/text)** property.<br>Drop boxes provide a multiple character search capability that makes it easier to search for an exact match in a drop box list. See **[Multiple Character Search](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/formatting-a-grid#search)**.<br>*(Multiple character search in drop boxes was added in PxPlus 2019.)* \|<br>\| *VarDropBoxHideBtn* \| Same as *VarDropBox*, but the drop-down button is shown only when focus is on the cell.<br>Drop boxes provide a multiple character search capability that makes it easier to search for an exact match in a drop box list. See **[Multiple Character Search](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/formatting-a-grid#search)**.<br>*(Multiple character search in drop boxes was added in PxPlus 2019.)* \| |
| *Column Name* | Logical name of the column. (See **[Named Columns](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/named-columns)**.) |
| *Column Separator* | Click the drop-down arrow to select a Hex or ASCII string value as the default separator character to use between columns during a load. |
| *Static Columns* | Used to set the number of leftmost columns that will remain fixed and will not be resized when the display is scrolled horizontally. |
|  |  |
| *Insert Above  <br>Insert Below* | Adds a blank row above or below the currently selected row for creating a new column. |
| *Delete* | Removes the currently selected row (i.e. removes the column from the grid). |
| *Move Up  <br>Move Down* | Changes the order of the existing columns in the grid. |

***Multiple Character Search***

Drop boxes provide a multiple character search capability that makes it easier to search for an exact match in a drop box list.

Note:  
Multiple character search applies to the following drop box [Cell Types](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/grid-control/formatting-a-grid#cell_types): "DropBox", "DropBoxHideBtn", "VarDropBox" and "VarDropBoxHideBtn".

To use this capability effectively, the characters ***must*** be entered within a ½ second of one another and ***must*** exactly match the start of an item in the drop box.

***Example:***

Assume that a drop box contains the following items:

```
C10000
C30000
C50000
```

Typing the character "c" followed within ½ second by the number "3" would select the "C30000" item.

Note:  
In drop boxes, searching always starts from the current selection and wraps.

*(Multiple character search in drop boxes was added in PxPlus 2019.)*
