Class: HorizontalLayout

HorizontalLayout

layoutEngines/horizontallayout.js, line 104

Creates a new instance of the HorizontalLayout engine.

Parameters:
Name Type Description
options Object

An object used to initialize the HorizontalLayout.

Name Type Default Description
rowHeaderWidth number 24 optional

The width of the row header cell.

colHeaderHeight number 80 optional

The height of the column header cell.

headerRow Object optional

An object used to define the headerRow configurations.

Name Type Description
visible boolean optional

Specifies whether the header row is visible.

height number optional

The header row height.

position string optional

The header row position. the value can be 'top' or 'bottom', the default value is 'bottom'.

separateColumn boolean optional

Specifies whether to show the entire header or show individual columns on the header row.

renderer string optional

The default header row renderer.

rowHeight number 80 optional

The default row height.

colWidth number | string '*' optional

The default column width.

colMinWidth number 8 optional

The default minimum column width.

showRowHeader boolean true optional

Specifies whether to show the row header.

showColHeader boolean true optional

Specifies whether to show the column header.

allowEditing boolean false optional

Globally allows all columns to be editable

allowSorting boolean false optional

Globally allows all columns to be sortable.

allowFocus boolean true optional

Specifies whether the layout engine can get focus.

selectionMode string 'single' optional

The selection mode. The value can be 'single', 'multiple', or 'none'.

selectionUnit string 'row' optional

Specifies selection unit. The value can be 'row' or 'cell'.

allowHeaderSelect boolean false optional

Specifies whether to show checkboxes on the row header. If true, the row can only be selected by checking the checkbox.

allowColumnReorder boolean true optional

Specifies whether the user can reorder columns at run time.

allowSwipe boolean false optional

Specifies whether to support the touch swipe action.

allowColumnResize boolean true optional

Specifies whether the user can resize columns at run time.

rightToLeft boolean false optional

Indicates whether to lay out elements from right to left.

editMode string 'inline' optional

Specifies which editing mode grid is used for editing. There are three modes 'inline', 'popup', and 'editForm'.

editUnit string 'row' optional

Specifies editing a cell or row in one time. There are two modes 'row' and 'cell'.

editRowTemplate string optional

The edit row template is used to customize the appearance of 'popup' mode and 'editForm' mode.

filterExpression string optional

A string filter expression used to filter the data collection.

allowGrouping boolean false optional

Specifies whether to show a group drag panel to help the user group the rows manually at run time.

defaultGroupingInfo Object optional

Default group setting object, settings in group descriptor has higher priority.

grouping Object | Array optional

A single group setting object or array of group setting objects used to initialize groups.

Name Type Description
field string optional

The column id used to group the column.

collapsed boolean optional

Specifies whether the group is collapsed.

preDefinedGroups Array optional nullable

The pre-defined group names that the user can customize.

converter Object optional

A function that is used to specify the group name. The function requires a cell value parameter when calling.

header Object optional

The group header settings.

Name Type Description
visible boolean optional

Specifies whether the group header is visible.

template string optional

The group header template.

height number optional

The group header height.

footer Object optional

The group footer settings.

Name Type Description
visible boolean optional

Specifies whether the group footer is visible.

template string optional

The group footer template.

height number optional

The height of the group footer.

collapseWithGroup boolean optional

Specifies whether the footer is collapsed when the group is collapsed. If false, the footer remains visible even if the group is collapsed.

groupStrategy Object optional

A group strategy object used to define the group layout strategy.

rowTemplate string optional

A string that starts with '#'+templateID or a raw html string that represents the structure and layout of a row.

pinnedLeftRowTemplate string optional

A string that starts with '#'+templateID or a raw html string that represents the structure and layout of a pinned-left row.

pinnedRightRowTemplate string optional

A string that starts with '#'+templateID or a raw html string that represents the structure and layout of a pinned-right row.

hierarchy Object optional

A single hierarchy setting object used to initialize the hierarchy structure.

Name Type Description
keyField string optional

A column id whose dataField stores the name of the data item's unique field.

parentField string optional

A column id whose dataField stores the name of the data item's parent field.

collapsed boolean optional

The initial state of the tree node.

column string optional

A column id that the tree node is displayed on.

offset number | GC.Spread.Views.DataView~hierarchyOffsetCallback optional

The offset of the entire tree column. This can be a callback function to customize the offset.

offsetUnit number optional

If options.hierarchy.offset is not assigned, the offset is calculated by the node level and offsetUnit.

footer Object optional

The hierarchy structure footer setting.

Name Type Description
visible boolean optional

Specifies whether to show hierarchy footers.

height number optional

The height of the hierarchy footer. If not set, it is the height of its row.

template string optional

An html fragment that defines the footer's appearance. If not set, the footer uses the row template to render itself.

sorting Object | Array optional

A single sort setting object or array of sort setting objects used to initialize sorting.

Name Type Default Description
field string optional

The field the user wants to sort.

ascending boolean true optional nullable

Indicates the sort order. The default is true.

converter Object optional

The converter callback for sorting.

allowAsyncRender boolean false optional

Indicates whether to run asyncRender method in column.