The Basics > Configuring Columns at Design Time > Visual editing |
At design time, you can use True DBGrid's visual editing mode to perform the following tasks:
Add and remove columns.
Copy columns to and from the Clipboard.
Move and resize columns.
Adjust the grid's row height.
Retrieve field layouts from a bound data source.
Split the grid into separate vertical scrolling regions.
Save the current grid layout to a file.
Load an existing grid layout from a file.
Access the grid's property pages.
To enter visual editing mode, click anywhere on the grid with the right mouse button to display the grid's context menu, then choose the Edit command.
The grid control is now activated in-place, which means that you can work with its columns directly on the form. For example, if you point to a dividing line between two columns, the mouse pointer changes to the following symbol.
This indicates that the column you are pointing to is ready to be resized. If you drag the dividing line to a different position, the column will change its width accordingly, and the grid will reposition any adjacent columns.
Similarly, if you point to a column header, the mouse pointer changes again.
This symbol indicates that the column is ready to be selected. If you click its header, the entire column is highlighted. You can also drag the mouse pointer within the column header area to extend the selection to other adjacent columns. To cancel the selection and return the columns to their normal, unhighlighted state, click any cell within the grid's data area.
Column selection serves two purposes in visual editing mode:
Selected columns can be moved to a different position within the grid by dragging within the column header (provided that AllowColMove is True for the current split).
Selected columns act as arguments for some visual editing menu commands.
If the grid is already in visual editing mode, right-clicking it again displays a different context menu. This is the visual editing menu, which provides commands for manipulating columns, splits, and layouts.
For more information on visual editing, as well as an explanation of the visual editing menu commands, seeDesign Time Interaction.