Object Reference > True DBGrid Methods > LoadLayout Method |
LoadLayout Method
The LoadLayout method loads a previously saved grid layout from a binary layout storage file and configures the grid accordingly.
TDBGrid.LoadLayout
Arguments
None
Return Value
None
You can use this method to easily switch to a predefined grid layout at run time.
The layout to be loaded is specified by the LayoutName property. The location of the binary layout storage file is specified by the LayoutFileName property (or the LayoutURL property if downloadable layouts are used). Before calling the LoadLayout method, you must set the LayoutName and LayoutFileName (or LayoutURL) properties to valid values.
To save the current grid layout to a binary layout storage file, use the Add method of the Layouts collection. To remove a named layout from a binary layout storage file, use the Remove method of the Layouts collection.