I'm implementing filtering via the HeaderRow of my grids, and I've run across a problem I can't seem to solve.
All the examples that show dataView Event handlers employ global variables to identify the related grid, such as in:
gridQMsgsDataView.onRowCountChanged.subscribe(rowCountChanged);
(...elsewhere...)
function rowCountChanged(e, args) {
grid.updateRowCount(); //'grid' is a global variable assigned to a slickGrid.
grid.render();
}
Unlike in the examples that I find, I'm creating slickjGrids and dataViews dynamically at runtime, and keep their reference variables in a list as I create them.
I can't tell at compile time how many there will be, thus I can't use something like the global "grid" variable to reference the relevant dataview and/or slickgrid.
So I have two questions, and appreciate any insight:
when my rowCountChanged handler is called...
A) How do I know which dataView generated the event?
B) Once I know that, how do I know which slickgrid that dataView is associated with?