Class: DataModel

ko.grid. DataModel

new DataModel(options)

model for grid data
Parameters:
Name Type Description
options Object overridable settings
Properties
Name Type Attributes Default Description
rows Array.<(Object|Array)> <optional>
[ ] initial dataset
page Number <optional>
1 current page location
pageSize Number <optional>
20 count of items per page
usejson Boolean <optional>
true treat rows as json objects alternative will expect arrays
sortField String <optional>
null field to sort by
sortOrder String <optional>
ko.grid.SORT_ASC order to sort by
onrequest function <optional>
null data request callback
onaddrow function <optional>
null row normalization callback
onaddcell function <optional>
null cell normalization callback
onchange function <optional>
null data change callback
onbefore function <optional>
null data before change callback
Source: