Class: GridControl

WinJSContrib.UI. GridControl

Control that layout it's children with different algorythms. Used with WinJSContrib.UI.Hub, The Grid could rely on multipass rendering to optimize large hub pages load.

new GridControl(element, options)

Parameters:
Name Type Description
element HTMLElement

DOM element containing the control

options Object
Source:

Members

autolayout :boolean

indicate if grid layout itself according to the page lifecycle (default to true)

Type:
  • boolean
Source:

GridLayoutsImpl

Layouts algorythm implementations

Source:

itemClassName :Object

css class added on item's placeholder

Type:
  • Object
Source:

itemInvoked :HTMLElement

callback triggered when clicking on an item

Type:
  • HTMLElement
Source:

items :Object

items to render

Type:
  • Object
Source:

itemTemplate :Object

item template (WinJS Template or template function)

Type:
  • Object
Source:

layouts :Object

layout definitions for the grid. It's an object containing several grid layout options. See WinJSContrib.UI.GridControlLayout

Type:
  • Object
Source:

multipass :string

indicate the kind of multipass treatment

Type:
  • string
Source:

scrollContainer :HTMLElement

scroll element containing the grid. Required for multi pass rendering

Type:
  • HTMLElement
Source:

Methods

clearLayout()

Clear all layout and position styles on items

Source:

dispose()

Release grid resources

Source:

getLayout()

get layout applicable to the current context

Source:

layout()

layout content items

Source:

prepareItems(items, renderOptions)

render HTML for items

Parameters:
Name Type Description
items Array

array of items to render

renderOptions Object
Source:

renderItemsContent()

force items content to render

Source:

updateLayout()

update grid layout

Source: