forked from mleibman/SlickGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
milaniliev edited this page May 27, 2011
·
40 revisions
Instead of passing SlickGrid an array of row objects, you can pass an object that holds (and updates!) all your rows. This object, which SlickGrid calls a Model, only needs to respond to a simple API:
model.getItem(i) // Returns the ith row
model.getLength() // Returns the number of itemsIf you modify the nth row, you will need to tell the grid that the row is invalid, and then call render() to update it:
grid.invalidateRow(n)
grid.render()You can also call grid.invalidateRows() to invalidate a lot of rows at once, and, if you just want to re-draw the whole grid, call grid.invalidate() (which doesn't seem to need a render() call after.)
grid.getColumnIndex(columnName) - Returns the numeric index of the given column. Useful when a column index is required by the API.
grid.getColumnIndex('first_name')Resources
- API Reference
- Grid
- Grid Options
- Column Options
- Grid Events
- Dataview
- Examples
- Plugins & Third-party packages
Learning
Tests
Contact/Support