Class M.GridView
Extends
M.View.
M.GridView defines a prototype of a grid view, that allows you to display several
views horizontally aligned. Therefore you can either use a predefined layout or you
can provide a custom layout.
Defined in: grid.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The layout for the grid view.
|
|
The type of this object.
|
- Fields borrowed from class M.View:
- childViews, computedValue, contentBinding, contentBindingReverse, cssClass, cssClassOnError, cssClassOnInit, cssStyle, events, hasFocus, html, id, isInline, isView, modelId, parentView, recommendedEvents, triggerActionOnChange, triggerActionOnEnter, triggerActionOnKeyUp, value
- Methods borrowed from class M.View:
- addCssClass, attachToObservable, clearHtml, clearValue, clearValues, computeValue, contentDidChange, delegateValueUpdate, design, getChildViewsAsArray, getIds, getValue, getValues, gotFocus, lostFocus, nl2br, registerEvents, removeCssClass, removeCssProperty, renderUpdate, secure, setCssProperty, setValueFromDOM, style, tab2space, theme, themeChildViews
- Methods borrowed from class M.Object:
- bindToCaller, create, destroy, extend, get, include, set
Field Detail
{Object}
layout
The layout for the grid view. There are two predefined layouts available:
- M.TWO_COLUMNS: a two column layout, width: 50% / 50%
- M.THREE_COLUMNS: a three column layout, width: 33% / 33% / 33%
- M.FOUR_COLUMNS: a four column layout, width: 25% / 25% / 25%
To specify your own layout, you will have to implement some css classes and
then define your layout like:
cssClass: 'cssClassForWholeGrid',
columns: {
0: 'cssClassForColumn1',
1: 'cssClassForColumn2',
2: 'cssClassForColumn3',
3: 'cssClassForColumn4',
//........
}
{String}
type
The type of this object.