This FormLayout
renders a Form
using an HTML-table based grid. This can be a 16 column grid or an 8 column grid. The grid is stable, so the alignment of the fields is the same for all screen sizes or widths of the Form
. Only the width of the single grid columns depends on the available width.
To adjust the appearance inside the GridLayout
, you can use GridContainerData
for FormContainers
and GridElementData
for content fields.
Note: If content fields have a width
property this will be ignored, as the width of the controls is set by the grid cells.
This control cannot be used stand-alone, it just renders a Form
, so it must be assigned to a Form
using the layout
aggregation.
Constructor for a new sap.ui.layout.form.GridLayout.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.layout.form.GridLayout(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
singleColumn | boolean | false | If set, the grid renders only one If not set, |
Name | Type | Default Value | Description |
---|---|---|---|
backgroundDesign | sap.ui.layout.BackgroundDesign | Translucent | Specifies the background color of the Note: The visualization of the different options depends on the theme used. |
Method | Description |
---|---|
sap.ui.layout.form.GridLayout.extend |
Creates a new subclass of class sap.ui.layout.form.GridLayout with name
|
sap.ui.layout.form.GridLayout.getMetadata |
Returns a metadata object for class sap.ui.layout.form.GridLayout. |
getSingleColumn |
Gets current value of property singleColumn. If set, the grid renders only one If not set, Default value is |
setSingleColumn |
Sets a new value for property singleColumn. If set, the grid renders only one If not set, When called with a value of Default value is |
Creates a new subclass of class sap.ui.layout.form.GridLayout with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.layout.form.FormLayout.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Returns a metadata object for class sap.ui.layout.form.GridLayout.
Gets current value of property singleColumn.
If set, the grid renders only one FormContainer
per column. That means one FormContainer
is below the other. The whole grid has 8 cells per row.
If not set, FormContainer
can use the full width of the grid or two FormContainers
can be placed beside each other. In this case the whole grid has 16 cells per row.
Default value is false
.
Sets a new value for property singleColumn.
If set, the grid renders only one FormContainer
per column. That means one FormContainer
is below the other. The whole grid has 8 cells per row.
If not set, FormContainer
can use the full width of the grid or two FormContainers
can be placed beside each other. In this case the whole grid has 16 cells per row.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSingleColumn | boolean | false |
New value for property |