https://rawb.codeplex.com/SourceControl/latest#Rawb/Rawb/js/rawb.ui.js

Grid

(See also Column specs.)

rawb.Grid({arg, ...})

Template: RawbGrid

An high-performance, highly configurable data grid. High performance comes
from rendering only what is visible on the grid (the performance is the
same displaying a ten-row grid whether you have a hundred rows or a
hundred thousand rows) and performing minimal re-rendering when the grid is
scrolled. Configurability largely comes from the ability to
specify individual cell templates.

The grid is divided vertically into three regions: the header, values, and
footer. The optional header and footer are static and do not move when
the grid values are scrolled vertically.

The grid is also divided horizontally into three regions: the left, middle,
and right. The optional left and right regions are static and do not move
when the grid values are scrolled horizontally.

Left headers Middle headers Right headers
Left values Middle values Right values
Left values Middle values Right values
Left values Middle values Right values
Left footers Middle footers Right footers


Resizing splitters separate each column of cells.

Parameters

data: array of objects (not scalars)
Optional (default []); may be observable; exposed as an observable.

The grid data to be displayed.

selection: observable object.
Optional (default undefined); must be observable; exposed as an observable.

The currently selected grid row, if any; undefined if no row is selected.

width: number
Optional (default 400); may be observable; exposed as an observable.

The width in pixels of the grid.

height: number
Optional (default 200); may be observable; exposed as an observable.

The height in pixels of the grid.

vScrollBarWidth: number
Optional (default 10); may be observable; exposed as an observable.

The width in pixels of the vertical scrollbar (when displayed).
The vertical scrollbar is removed if all rows in data are currently
visible in the grid.

hScrollBarHeight: number
Optional (default 10); may be observable; exposed as an observable.

The height in pixels of the horizontal scrollbar.

resizerWidth: number
Optional (default 1); may be observable; exposed as an observable.

The width in pixels of the resizer dividers.

headerRowHeight: number
Optional (default 25); may be observable; exposed as an observable.

The height in pixels of the header row.

valueRowHeight: number
Optional (default 25); may be observable; exposed as an observable.

The height in pixels of each value row.

footerRowHeight: number
Optional (default 25); may be observable; exposed as an observable.

The height in pixels of the footer row.

rowsPerStripe: number
Optional (default 1); may be observable; exposed as an observable.

The number of adjacent rows forming each alternating "zebra stripe".
Set to 0 to suppress zebra striping.

click: function (row)
Optional (default undefined); not exposed.

The action to carry out when the user clicks on a value row.

dblClick: function (row)
Optional (default undefined); not exposed.

The action to carry out when the user double-clicks on a value row.

enterKey: function ()
Optional (default undefined); exposed.

The action to carry out when the user hits the enter key while the grid has focus.

escKey: function ()
Optional (default undefined); exposed.

The action to carry out when the user hits the escape key while the grid has focus.

includeResizingHandle: boolean
Optional (default undefined); exposed.

If true, the grid is displayed with a resizing handle in its lower right corner.
If false, the grid does not display a resizing handle.

leftColumns: array of column specs
Optional (default []); must not be an observable; not exposed.

The specification for the fixed columns in the left part of the grid. See Column specs.

rightColumns: array of column specs
Optional (default []); must not be an observable; not exposed.

The specification for the fixed columns in the right part of the grid. See Column specs.

columns: array of column specs
Optional (default []); must not be an observable; not exposed.

The specification for the columns in the middle part of the grid to which the
horizontal scrollbar applies. See Column specs.

Grid properties and methods

topRowIndex: observable number
The index into data of the top-most row currently displayed in the grid.

scroll(delta): function(number)
Calling scroll(n) scrolls the displayed grid rows up by n rows (or down if n is negative).

numRows: computed number
The number of value row lines displayed in the grid (rounded up if the last displayed row is partially
obscured due to the grid height).

dispose(): function ()
This function clears up all subscriptions etc. created by the grid.
Use this when the Grid instance goes out of scope, if you are concerned about potential memory leaks.