Created
June 1, 2014 21:45
-
-
Save josebalius/f6abe59153d97d646f40 to your computer and use it in GitHub Desktop.
ngReactGrid - Setup options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Properties you can set | |
columnDefs: [], | |
data: [], | |
height: 500, | |
localMode: true, | |
/** | |
* Use this function when setting localMode = false, | |
* it will be called for every change in page size, sort, search, or pagination. | |
* @return void | |
*/ | |
getData: function() { | |
var grid = this; | |
// grid.currentPage | |
// grid.search | |
// grid.sortInfo.field, grid.sortInfo.dir | |
// grid.pageSize | |
// After making the server call, update the grid by simply setting the data and totalCount | |
// $scope.grid.data = [], $scope.grid.totalCount = 0 | |
}, | |
totalCount: 0, | |
pageSize: 25, | |
pageSizes: [25, 50, 100], | |
horizontalScroll: false, | |
// Properties you can get, usually calculated after instantiation | |
totalPages: 0, // calculated with pageSize and totalCount | |
currentPage: 1, | |
sortInfo: { | |
field: "", // field property in columnDefs | |
dir: "" // asc or desc | |
}, | |
search: "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment