Constructor
DataGrid factory
Parameters:
element must be an Object.
(Element to receive DataGrid)
store must be an Object.
(DataStore)
fields must be an Array.
(Array of fields to display)
sortable must be an Array.
([Optional] Array of sortable columns/fields)
options must be an Object.
([Optional] DataList options)
filtered must be a Boolean.
([Optional] Create an input to filter the DataGrid)
Setting constructor loop
Method dump
Exports data grid records
Returns an Array
(Record set)
Method init
Initializes DataGrid
Parameters:
Returns an Object
(DataGrid instance)
Creating DataList template based on fields
Adding CSS class if "column" is sortable
Applying default sort, if specified
Setting click handler on sortable "columns"
Creating DataList
Setting by-reference DataList on DataGrid
Creating DataListFilter
Setting by-reference DataListFilter on DataGrid
Method refresh
Refreshes the DataGrid
Returns an Object
(DataGrid instance)
Method sort
Sorts the DataGrid when a column header is clicked
Parameters:
Returns an Object
(DataGrid instance)
Stopping event propogation
Refreshing list if target is sortable
Method teardown
Tears down the DataGrid
Returns an Object
(DataGrid instance)
Removing click handler on DataGrid header
Destroying DataGrid (from DOM)
Method grid
DataGrid factory
Parameters:
element must be an Object.
(Element to receive DataGrid)
store must be an Object.
(DataStore)
fields must be an Array.
(Array of fields to display)
sortable must be an Array.
([Optional] Array of sortable columns/fields)
options must be an Object.
([Optional] DataList options)
filtered must be a Boolean.
([Optional] Create an input to filter the data grid)
debounce must be a Number.
([Optional] DataListFilter input debounce, default is 250)
Returns an Object
(DataGrid instance)