Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.
an object representing the default row header,
if a string is provided it will be used as the key of the header, if a number is provided
it will be used as the index of the header.
Properties
Name
Type
Argument
Description
default
string
<optional>
disable default row headers or provide them as indexes 'none' or 'index'
Constructor
new ArrayDataGridDataSource(data, options)
Parameters:
Name
Type
Argument
Description
data
Array
|
Object
the data in the form of array or observable array.
an object representing the default row header,
if a string is provided it will be used as the key of the header, if a number is provided
it will be used as the index of the header.
Properties
Name
Type
Argument
Description
default
string
<optional>
disable default row headers or provide them as indexes 'none' or 'index'
Fields
comparator :Function
If set to a function(row1, row2), then this function is called comparing raw row data (see the
JavaScript array.sort() for details)
sortCriteria :Object
The sort criteria. Whenever sort() is called with the criteria parameter, that value is copied to this
property. If sort() is called with empty sort criteria then the criteria set in this property is used.
Properties:
Name
Type
Description
axis
string
the sort axis valid values are "column", "row"
direction
string
the sort direction, valid values are "ascending", "descending", "none" (default)
Information about the cell range. A cell range is defined by an array
of range info for each axis, where each range contains three properties: axis, start, count.
callbacks
Object
the callbacks to be invoke when fetch cells operation is completed.
callbackObjects
Object
<optional>
the object in which the callback function is invoked on.
the callback to invoke when fetch headers completed successfully.
The function takes three parameters: HeaderSet object representing start headers, headerRange object passed into the original fetchHeaders call,
and a HeaderSet object representing the end headers along the axis.
headerRange.axis
string
the axis of the header that are fetched. Valid values are "row" and "column".
headerRange.count
number
the size of the range in which the header data are fetched.
headerRange.start
number
the start index of the range in which the header data are fetched.
Returns:
Type
undefined
getCapability(feature) : {string|null}
Determines whether this ArrayDataGridDataSource supports certain feature.
Parameters:
Name
Type
Description
feature
string
the feature in which its capabilities is inquired. Currently the only valid feature is "sort" and "move"
Returns:
the name of the feature. For sort, the valid return values are: "full", "none". Returns null if the
feature is not recognized.
Type
string
|
null
getCount(axis) : {number}
Returns the total number of rows or columns. If the value return is not >= 0 then it is automatically assumed
that the total count is unknown.
Parameters:
Name
Type
Description
axis
string
the axis in which we inquire for the total count. Valid values are "row" and "column".
Returns:
the total number of rows/columns.
Type
number
getCountPrecision(axis) : {string}
Returns whether the total count returned in getCount function is an actual or an estimate.
Parameters:
Name
Type
Description
axis
string
the axis in which we inquire whether the total count is an estimate. Valid values are
"row" and "column".
Returns:
"exact" if the count returned in getCount function is the actual count, "estimate" if the
count returned in getCount function is an estimate. The default value is "exact".
Application can call this if it wants to be notified of an event. It can call the off method to detach the handler when it no longer wants to be notified.