Guys,

I've finally gotten around to implementing a sample Model to drive the
SlickGrid.
As it stands right now, it provides a filtered/sorted view of the data
as well as a mechanism to resort or update the filters.  Whenever the
data in the view changes, the model fires onRowCountChanged and/or
onRowsChanged events containing numbers of rows that changed.  We then
wire the onRowCountChanged to call grid.resizeCanvas() and
onRowsChanged to call grid.removeRow() for each changed row and then
grid.render() to fill in the blanks.  This way, the grid only updates
the changed portions and only in the viewport which allows it to do
real-time updates to large amounts of data.

This is one of the areas where SlickGrid really shines.  The test page
at http://slickgrid.googlecode.com/svn/trunk/example4-model.html shows
an editable spreadsheet of 500 tasks with a filter pane on top.
Notice that typing in the search textbox or dragging the slider
results in a REAL-TIME update of the grid.

Reply via email to