Wrapper for set data

This commit is contained in:
Sam Georges 2014-07-17 19:25:01 +10:00
parent 242a3a5cde
commit 2aa13c685f
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,7 @@
else if (this.options.sourceHandler) {
$.request(self.options.sourceHandler, {
success: function(data, textStatus, jqXHR){
self.gridInstance.loadData(data.result)
self.setData(data.result)
}
})
}
@ -164,6 +164,10 @@
return $.extend(true, {}, this.gridInstance.getDataAtRow(row))
}
DataGrid.prototype.setData = function(data) {
this.gridInstance.loadData(data)
}
DataGrid.prototype.getData = function() {
var self = this,
results = [],