GridData
The GridData provides the layout data for a UI element in a container to which GridLayout is assigned. A grid layout defines a number of cells. In a grid layout cell, you can align a UI element both horizontally (left-justified, horizontally centered, right-justified, and so on) and vertically (top-aligned, vertically centered, bottom-aligned, and so on). The default setting for the alignment of the UI elements within the GridLayouts is left-justified and top-aligned.
Padding can be specified in two ways:
● In the GridLayout using GridLayout.cellPadding
● In the GridData using GridLayout.paddingLeft, or GridLayout.paddingRight, etc.
Both ways are possible. If you set the padding on the GridLayout, padding is set evenly on each cell, as shown in the figure in GridLayoutProperties.
You can also specify padding on each cell. Paddings specified on GridLayouts and GridData are added up.
Runtime Class |
CL_WD_GRID_DATA |
Properties in the View Designer
Name |
Type |
Initial Value |
Bindable |
STRING |
(automatic) |
No |
|
WDUI_CELL_BG_DESIGN |
transparent |
Yes |
|
I |
1 |
No |
|
STRING |
|
No |
|
STRING |
|
No |
|
WDUI_CELL_HALIGN |
beginOfLine |
No |
|
STRING |
|
No |
|
STRING |
|
No |
|
STRING |
|
No |
|
STRING |
|
No |
|
WDUI_CELL_VALIGN |
baseline |
No |
|
STRING |
|
No |

Other properties that can be inherited are defined in the associated higher-level classes. The associated UI elements are:
For dynamic programming, the same properties, events, and aggregations as in the View Designer are available. Bear in mind the different spellings.
Dynamic Programming of Properties
View Designer Name |
Runtime Name |
Type |
CELL_BACKGROUND_DESIGN |
WDUI_CELL_BG_DESIGN |
|
cellBackgroundDesign: border |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-BORDER |
|
cellBackgroundDesign: fill1 |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-FILL1 |
|
cellBackgroundDesign: fill2 |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-FILL2 |
|
cellBackgroundDesign: fill3 |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-FILL3 |
|
cellBackgroundDesign: header |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-HEADER |
|
cellBackgroundDesign: plain |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-PLAIN |
|
cellBackgroundDesign: transparent |
CL_WD_GRID_DATA=>E_CELL_BACKGROUND_DESIGN-TRANSPARENT |
|
COL_SPAN |
I |
|
DRAG_DATA |
STRING |
|
HEIGHT |
STRING |
|
H_ALIGN |
WDUI_CELL_HALIGN |
|
hAlign: beginOfLine |
CL_WD_GRID_DATA=>E_H_ALIGN-BEGIN_OF_LINE |
|
hAlign: center |
CL_WD_GRID_DATA=>E_H_ALIGN-CENTER |
|
hAlign: char |
CL_WD_GRID_DATA=>E_H_ALIGN-CHAR |
|
hAlign: endOfLine |
CL_WD_GRID_DATA=>E_H_ALIGN-END_OF_LINE |
|
hAlign: forcedLeft |
CL_WD_GRID_DATA=>E_H_ALIGN-FORCED_LEFT |
|
hAlign: forcedRight |
CL_WD_GRID_DATA=>E_H_ALIGN-FORCED_RIGHT |
|
hAlign: justify |
CL_WD_GRID_DATA=>E_H_ALIGN-JUSTIFY |
|
PADDING_BOTTOM |
STRING |
|
PADDING_LEFT |
STRING |
|
PADDING_RIGHT |
STRING |
|
PADDING_TOP |
STRING |
|
V_ALIGN |
WDUI_CELL_VALIGN |
|
vAlign: baseline |
CL_WD_GRID_DATA=>E_V_ALIGN-BASELINE |
|
vAlign: bottom |
CL_WD_GRID_DATA=>E_V_ALIGN-BOTTOM |
|
vAlign: middle |
CL_WD_GRID_DATA=>E_V_ALIGN-MIDDLE |
|
vAlign: top |
CL_WD_GRID_DATA=>E_V_ALIGN-TOP |
|
WIDTH |
STRING |
|