Class sap.ui.layout.form.GridLayoutModule: sap/ui/layout/form/GridLayout

extends FormLayout
known direct subclasses: GridLayout

This FormLayout renders a Form using a 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 only renders a Form, so it must be assigned to a Form.


Since: 1.16.0.
Constructor Summary
new sap.ui.layout.form.GridLayout(sId?, mSettings?)Constructor for a new sap.ui.layout.form.GridLayout.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.layout.form.GridLayout.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.layout.form.GridLayout with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.layout.form.GridLayout.getMetadata()Returns a metadata object for class sap.ui.layout.form.GridLayout.
getSingleColumn()Gets current value of property singleColumn.
setSingleColumn(bSingleColumn)Sets a new value for property singleColumn.
Constructor Detail
new sap.ui.layout.form.GridLayout(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.layout.form.FormLayout can be used as well.

Parameters:
{string}sId? Id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Method Detail
sap.ui.layout.form.GridLayout.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.layout.form.GridLayout.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.layout.form.GridLayout.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getSingleColumn(): boolean
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.

Returns:
{boolean} Value of property singleColumn
setSingleColumn(bSingleColumn): sap.ui.layout.form.GridLayout
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.

Parameters:
{boolean}bSingleColumn New value for property singleColumn
Returns:
{sap.ui.layout.form.GridLayout} Reference to this in order to allow method chaining