LMD GridPack Guide


Design-Time Features


TLMDGrid control provides several enhanced design-time features. First, is the graphical column editor. The column editor can be activated by double clicking on the grid control or clicking on the "Columns" item of the control's context menu:

 

clip0014

 

Column editor allows to add/delete column of registered types, and reorder columns. Column editor is a modeless window, so its possible to work with other IDE windows having keeping editor open. This allows to select column objects using column editor to edit their properties in Delphi's object inspector.

 

Column objects can be also selected in Delphi's designer by clicking on the column's header. The column is highlighted with a blue rectangle and its properties are shown in Delphi's object inspector.

 

clip0015

 

Its important to understand that the columns of different types are actually a descendants of the common base column class. Thus, the column of particular type can have (and usually do have) additional properties, unique to this column type only. There are a lot of such properties; for example, check box column have a DrawGrayed property, which determines, whether to draw a gray "undefined" check box in case of Null cell value.

 

The last unusual feature, which need to be noted here - is column's Chooser property:

 

clip0016

 

As seen from the picture above, Chooser property have both: a drop-down list and sub-properties. Drop-down list contains available chooser types, while sub-properties shows chooser properties. As with column objects, choosers of different types have different sets of specific properties. Changing chooser type by selecting the type from drop-down list will always reset all properties to default values, because the chooser object need to be recreated.

Some choosers also have specific events. Look at the Events tab of the object inspector to find them:

 

clip0017