Open slickLearner opened 9 years ago
I've included following .js files and following standard example code. still, while subscribing to dataView events, shows undefined.
Let me know if any dependencies I am missing. any kind of help would much be appreciated. Script Portion :
<link href="Content/CSS/slickGrid/slick.grid.css" rel="stylesheet" /> <link href="Content/CSS/slickGrid/jquery-ui-1.8.16.custom.css" rel="stylesheet" /> <link href="Content/CSS/slickGrid/slick.columnpicker.css" rel="stylesheet" /> <link href="Content/CSS/slickGrid/slick.pager.css" rel="stylesheet" />
<script src="Content/JS/slickGrid/slick.core.js"></script> <script src="Content/JS/slickGrid/slick.grid.js"></script> <script src="Content/JS/slickGrid/slick.dataview.js"></script> <script src="Content/JS/slickGrid/slick.columnpicker.js"></script> <script src="Content/JS/slickGrid/slick.pager.js"></script>
Code Snippet :
var grid; var columns = [ ... ] var options = { enableCellNativation: true, enableColumnReorder: true, forceFitColunns: true, headerRowHeight: 30, rowHeight: 60 }; try { dataView = new Slick.Data.DataView(); dataView = dView;
grid = new Slick.Grid("#TrailInformationGrid", dataView, columns, options);
dataView.onRowCountChanged.subscribe(function (e, args) { grid.updateRowCount(); grid.render(); });
dataView.onRowsChanged.subscribe(function (e, args) { grid.invalidateRows(args.rows); grid.render(); }); dataView.onPagingInfoChanged.subscribe(function (e, pagingInfo) { console.log(grid.getSEelectedRows());
}catch (e) { alert(e); }
I would recommend using one of the example files and modifying it one step at a time. dataView.onPagingInfoChanged.subscribe is missing a closing bracket and paren, but that might just be a typo.
I've included following .js files and following standard example code. still, while subscribing to dataView events, shows undefined.
Let me know if any dependencies I am missing. any kind of help would much be appreciated. Script Portion :
Code Snippet :
var grid; var columns = [ ... ] var options = { enableCellNativation: true, enableColumnReorder: true, forceFitColunns: true, headerRowHeight: 30, rowHeight: 60 }; try { dataView = new Slick.Data.DataView(); dataView = dView;
dataView.onRowCountChanged.subscribe(function (e, args) { grid.updateRowCount(); grid.render(); });
}catch (e) { alert(e); }