JavaScript API Reference
Class Index | File Index

## Classes

- wm
- wm.Bounds
- wm.Component
- wm.Container
- wm.Control
- wm.DataGrid
- wm.DataGridColumn
- wm.Dijit
- wm.expression
- wm.LiveForm
- wm.LiveVariable
- wm.LiveView
- wm.MavericksModel
- wm.NavigationCall
- wm.NavigationService
- wm.Object
- wm.Panel
- wm.Service
- wm.ServiceVariable
- wm.Variable

# Class wm.DataGrid

Extends wm.dijit.Grid.
Defined in: DataGrid.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| wm.DataGrid() Widget for displaying and editing tabulated data.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| clearSelection() Clear the selection such that no rows are selected.
| getEmptySelection() Returns true if there are no selected rows.
| getSelectedIndex() Returns the index of the selected row.
| hasSelection() Returns true if there any selected rows.
| onAfterRender() Event that fires after the Grid is populated.
| onBeforeRender() Event that fires before the Grid is populated.
| onCellClick(inEvent) Fires when the user clicks the mouse in a cell.
| onDeselected(inIndex) Event that occurs when a selection is removed.
| onHeaderCellClick(inEvent) Fires when the user clicks the mouse in the grid header.
| onSelected(inIndex) Event that occurs when a selection is made.
| onSelectionChanged() Event that occurs when the selection is changed.
| onSetColumns(inColumn, inIndex) Allows user code to customize column objects.
| onSetStructure(inStructure) Allows user code to customize grid structure.
| select(inIndex) Select a row by index.
| update() Force an update of the data model bound to this grid.

Class Detail
wm.DataGrid()
Widget for displaying and editing tabulated data.
Report errata or suggestions for DataGrid.
Method Detail
clearSelection()
Clear the selection such that no rows are selected.
Report errata or suggestions for clearSelection.

getEmptySelection()
Returns true if there are no selected rows.
This method exists to support the bindable emptySelection virtual property (i.e. it implements `getValue("emptySelection")`.).

Returns:
  @Boolean True if no rows are selected.

Report errata or suggestions for getEmptySelection.

getSelectedIndex()
Returns the index of the selected row.

Returns:
  @Number Integer index of selected row.

Report errata or suggestions for getSelectedIndex.

hasSelection()
Returns true if there any selected rows.

Returns:
  @Boolean True if any rows are selected.

Report errata or suggestions for hasSelection.

onAfterRender()
Event that fires after the Grid is populated.
This event is fired after the Grid is populated, allowing custom code to cache information or do tasks.
Report errata or suggestions for onAfterRender.

onBeforeRender()
Event that fires before the Grid is populated.
This event is fired before the Grid is populated, allowing custom code to cache information or do tasks.
Report errata or suggestions for onBeforeRender.

onCellClick(inEvent)
Fires when the user clicks the mouse in a cell.
inEvent object is decorated with information about the clicked cell.

Parameters:
{wm.DataGrid.Event} inEvent
  The browser event object, decorated.

Report errata or suggestions for onCellClick.

onDeselected(inIndex)
Event that occurs when a selection is removed.
Deselections are buffered, so only the last in a series of rapid deselections will trigger this event.

Parameters:
{Number} inIndex
  The index of the de-selected row.

Report errata or suggestions for onDeselected.

onHeaderCellClick(inEvent)
Fires when the user clicks the mouse in the grid header.
inEvent object is decorated with information about the clicked header.

Parameters:
{wm.DataGrid.Event} inEvent
  The browser event object, decorated.

Report errata or suggestions for onHeaderCellClick.

onSelected(inIndex)
Event that occurs when a selection is made.
Selections are buffered, so only the last in a series of rapid selections will trigger this event.

Parameters:
{Number} inIndex
  The index of the selected row.

Report errata or suggestions for onSelected.

onSelectionChanged()
Event that occurs when the selection is changed.
Selections are buffered, so only the last in a series of rapid selections will trigger this event.
Report errata or suggestions for onSelectionChanged.

onSetColumns(inColumn, inIndex)
Allows user code to customize column objects.
This event is fired for each column in the Grid. Custom code can modify the column object to alter behavior or appearance of the Grid.

Parameters:
{wm.DataGridColumn} inColumn
  Object whose properties describe the grid column.
{Number} inIndex
  Numeric index of the column

Report errata or suggestions for onSetColumns.

onSetStructure(inStructure)
Allows user code to customize grid structure.
This event is fired whenever the Grid is initialized. Custom code can modify the structure object to alter behavior or appearance of the Grid.
ToDo: document inStructure properties.

Parameters:
{Object} inStructure
  Object whose properties describe the grid structure.

Report errata or suggestions for onSetStructure.

select(inIndex)
Select a row by index.
Previous selection is cleared.

Parameters:
{Number} inIndex
  Integer index of row to select.

Report errata or suggestions for select.

update()
Force an update of the data model bound to this grid.
Report errata or suggestions for update.

Documentation generated by JsDoc Toolkit 2.0.1 on Wed Jun 03 2009 13:28:38 GMT-0700 (PDT)