Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - fix(dataView): add option to apply row selection to all pages #689

Closed
wants to merge 124 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
dea574f
add Tree Data with filter sample
ghiscoding-SE Apr 8, 2020
e9cd38b
improve search perf by moving the filterMyFiles call into keyup event
ghiscoding-SE Apr 8, 2020
8868fe8
add more info in readme
ghiscoding-SE Apr 9, 2020
c9499f8
add more comments in readme
ghiscoding-SE Apr 9, 2020
aa17708
update readme
ghiscoding-SE Apr 9, 2020
1d9f75a
removed the need for dedupe by using ._used flag
Alex-ley Apr 9, 2020
accf800
saved an array of IDs instead of the items themselves to speed-up filter
Alex-ley Apr 9, 2020
c6db7a4
Merge pull request #2 from Alex-ley/master
ghiscoding Apr 9, 2020
985ae76
(tree): make it pretty
ghiscoding-SE Apr 9, 2020
7f8081b
cleanup the code a bit more and add more comments
ghiscoding-SE Apr 9, 2020
90b3e1e
add clear filter button
ghiscoding-SE Apr 9, 2020
0945975
attemp at new recursive search
Alex-ley Apr 10, 2020
4ee56af
add Tree Data sorting demo
ghiscoding Apr 11, 2020
7588f29
refactor tree data sorting code
ghiscoding Apr 11, 2020
b7646b6
Merge branch 'master' of https://github.com/ghiscoding/SlickGrid
Alex-ley Apr 11, 2020
5f692b2
fixed bugs in pull #4 to SlickGrid
Alex-ley Apr 11, 2020
39b4a72
Merge pull request #4 from Alex-ley/master
Alex-ley Apr 11, 2020
970c45a
refactored functions to allow nested array of objects or object of ob…
Alex-ley Apr 13, 2020
988b8ff
Merge pull request #5 from Alex-ley/master
ghiscoding Apr 14, 2020
84158e3
added JSDoc types to each function
Alex-ley Apr 14, 2020
ef1bc9b
feature - solve filter conditions met accross tree path
Alex-ley Apr 15, 2020
1f827ea
added flag excludeChildrenWhenTreeDataFiltering and logic
Alex-ley Apr 15, 2020
b79e80b
add aggregation into sizeFormatter, ref #5
ghiscoding Apr 16, 2020
2bb0d64
show aggregation on page load by calling fake filter
ghiscoding Apr 16, 2020
0f7327a
refactored filterMyFiles out from the example to the TreeData Plugin
Alex-ley Apr 16, 2020
3aa77f9
created fromInputReturnFlatAndNestedDataStructures function
Alex-ley Apr 16, 2020
f94e292
move filterMyFiles() into plugin and rename it. Also fix dummy filter…
Alex-ley May 13, 2020
622f89b
first pass at updating __agg__props
Alex-ley May 17, 2020
fe7bceb
fixed updating __agg__props by adding grid.invalidate() to onSearchKe…
Alex-ley May 17, 2020
f89f7c5
clean up, get rid of filteredChildrenAndParents array
Alex-ley May 17, 2020
eaa9626
Merge pull request #6 from Alex-ley/master
ghiscoding May 17, 2020
792ade9
Merge pull request #1 from 6pac/master
arashdalir May 25, 2020
94a86ba
Merge pull request #2 from 6pac/master
arashdalir Jun 2, 2020
fe22d9d
(treeData): add sort to Tree Data
ghiscoding Jun 23, 2020
056675c
(treeData): remove unnecessary tree data sorting file
ghiscoding Jun 23, 2020
5db071a
(treeData): add numeric sort and field types for sorting
ghiscoding Jul 7, 2020
47cbeda
Merge pull request #7 from ghiscoding/feat/tree-data-sort
ghiscoding Jul 7, 2020
bf569a2
Merge pull request #3 from 6pac/master
arashdalir Jul 30, 2020
e2c5d8f
added `composer.json` to allow fetching of SlickGrid as `composer` pa…
Jul 30, 2020
6ac4788
feat(plugins): add header/grid menu item "hidden" property
ghiscoding Sep 21, 2020
2121fe7
refactor(plugins): add "hidden" property to HeaderButton plugin as well
ghiscoding Sep 21, 2020
ff2d058
refactor(plugins): add "hidden" property to all plugins with menu items
ghiscoding Sep 21, 2020
0597d66
refacor(plugins): add "hidden" property everywhere potentially called
ghiscoding Sep 21, 2020
7343ed8
Merge remote-tracking branch 'upstream/feat/header-grid-menu-hidden-c…
Sep 22, 2020
96a5667
Merge branch 'master' of https://github.com/6pac/SlickGrid
Oct 16, 2020
be45580
fix(dataView): add option to apply row selection to all pages
Oct 19, 2020
a3bbe28
tests: add Cypress E2E tests for select in all pages
Oct 19, 2020
961faca
refactor: update to latest Cypress version and simplified cy run command
Oct 19, 2020
6c93453
feat(dataView): add 2 new functions to get all filtered data
Oct 19, 2020
b536810
feat(dataView): add another new functions setSelectedIds
Oct 20, 2020
99bb564
refactor(dataView): fix Select All checkbox with DataView
Oct 20, 2020
454f839
tests: add more Cypress E2E tests for "Select All" checkbox
Oct 20, 2020
18ef5bb
refactor: fix selected Ids without filtered items
Oct 22, 2020
9f54948
refactor: small getAllSelectedFilteredIds fix
Oct 22, 2020
b9f4300
refactor: fix "Select All" button not being selected
Oct 22, 2020
7543f1e
resolved issues with `preserveHiddenOnSelectionChange`
Oct 23, 2020
39760ed
Merge branch 'fix/select-all-row-with-pagination' into fix/select-all…
Oct 23, 2020
ce63626
removed `composer.json`
Oct 23, 2020
e1da4ca
reverted the wrongly deleted `package.json`
Oct 23, 2020
4473997
fixed broken multi-column sort on invisible columns
Oct 28, 2020
8844b96
Merge branch 'fix/select-all-row-with-pagination-v2' into gemik-stable
Oct 28, 2020
e98f96c
Merge branch 'fix/multi-sort-broken-on-invisible-columns' into gemik-…
Oct 28, 2020
1168355
Feature:TotalCount in Pager - it's now possible to show the number of…
Feb 3, 2021
a33a5df
Merge branch 'Feature-TotalCount' into gemik-stable
Feb 3, 2021
ac0f21c
Merge remote-tracking branch 'upstream/master' into gemik-stable
Feb 3, 2021
b8c22d7
Merge remote-tracking branch 'upstream/master'
Feb 3, 2021
d5e1929
Revert "Merge remote-tracking branch 'upstream/master' into gemik-sta…
Feb 3, 2021
e08abb4
Merge branch 'master' into gemik-stable
Feb 3, 2021
6ea6873
Merge remote-tracking branch 'ghiscoding/master'
Feb 3, 2021
3cc3a0e
Revert "Revert "Merge remote-tracking branch 'upstream/master' into g…
Feb 3, 2021
1f57c1f
resolved issues after merging upstream-main
Feb 3, 2021
dfb3d67
Merge branch 'master' into gemik-stable
Feb 3, 2021
c3da4d7
resolved an issue with renaming `dataView.getItemCount`
Feb 3, 2021
9a0a9d8
Merge branch 'gemik-stable'
Feb 3, 2021
488f84c
Merge remote-tracking branch 'origin/gemik-stable' into gemik-stable
Feb 12, 2021
3a05556
Revert "Merge branch 'gemik-stable'"
Feb 3, 2021
a425272
Merge branch 'master' into gemik-stable
Feb 12, 2021
5389b4f
Revert "Merge branch 'master' into gemik-stable"
Feb 12, 2021
81c4f49
Merge pull request #4 from 6pac/master
arashdalir Feb 23, 2021
fa63f24
Merge remote-tracking branch 'origin/master'
Feb 23, 2021
afe899d
Merge branch 'master' into gemik-stable
Feb 23, 2021
878abc9
Merge pull request #5 from 6pac/master
arashdalir May 12, 2021
f279194
Merge remote-tracking branch 'origin/master' into gemik-stable
May 12, 2021
5336687
added `reset` function to stateStorage
Jun 2, 2021
dc58417
added `reset` function to stateStore
Jun 2, 2021
2d0a3ac
Merge pull request #6 from 6pac/master
arashdalir Jun 2, 2021
90f5b2d
Merge branch 'master' into gemik-stable
Jun 2, 2021
6ebc801
removed the composer.json file
Jun 2, 2021
bdd09c9
Merge branch 'master' into gemik-stable
Jun 2, 2021
93f5228
gridMenu button is now optional - default is on
Jun 10, 2021
4ec35b9
Merge branch 'feature/gridMenu-button-optional' into gemik-stable
Jun 10, 2021
7bff57d
gridmenu-button now optional
Jun 18, 2021
6987010
Merge branch 'feature/gridMenu-button-optional' into gemik-stable
Jun 18, 2021
8b4f7a4
added the possibility to store `userData` while saving grid state
Aug 31, 2021
c0f4464
added custom paging options + configurable default show-page-sizes
Aug 31, 2021
31d7433
Merge branch 'optional-state-userData' into gemik-stable
Aug 31, 2021
d0c3fe1
Merge branch 'custom-paging-options' into gemik-stable
Aug 31, 2021
0fd2dc0
minor code readability enhancement
Aug 31, 2021
b07eec1
removed the unnecessary `console.log`
Aug 31, 2021
23a7d8e
Merge branch 'optional-state-userData' into gemik-stable
Aug 31, 2021
f1bed12
Merge branch 'custom-paging-options' into gemik-stable
Aug 31, 2021
fdfb4d0
resolved an issue with the `save` function being executed from `notif…
Aug 31, 2021
50b4862
Merge branch 'optional-state-userData' into gemik-stable
Aug 31, 2021
ed11274
improved userData storage in slick-grid state
Sep 6, 2021
14a3b49
Merge branch 'optional-state-userData' into gemik-stable
Sep 6, 2021
2db1ca4
improved userData storage in slick-grid state
Sep 7, 2021
da8def6
Merge branch 'optional-state-userData' into gemik-stable
Sep 7, 2021
ac6523e
Merge pull request #8 from 6pac/master
arashdalir Sep 24, 2021
72e5d1d
`scrollRowIntoView` is now only called if allowed by user
Sep 24, 2021
af801b6
Merge branch 'bugfix/scrollToRowByState' into gemik-stable
Sep 24, 2021
ae37e89
Merge branch 'master' into gemik-stable
Sep 24, 2021
008ed86
Merge branch 'bugfix/scrollToRowByState' into gemik-stable
Sep 24, 2021
9b5964d
Merge remote-tracking branch 'origin/gemik-stable' into gemik-stable
Sep 24, 2021
c1257b0
Merge remote-tracking branch '6pac/master' into gemik-stable
Apr 26, 2022
26dc025
`Slick.Plugins.Resizer` now has `setOptions()`
Apr 26, 2022
46c06a8
better formatting of the code
Apr 26, 2022
d0b797d
docs: add missing Code of Conduct
ghiscoding Apr 30, 2022
41cfcfe
Merge remote-tracking branch '6pac/chore/code-of-conduct' into gemik-…
Jul 13, 2022
2825282
Merge remote-tracking branch '6pac/master'
Aug 17, 2022
34edfc2
Merge branch 'master' into gemik-stable
Aug 17, 2022
ce08998
resolving issue with the `setOptions` function in resizer plugin
Aug 17, 2022
ae7f732
Merge branch 'master' into gemik-stable
Aug 17, 2022
5d8b673
Merge branch '6pac:master' into master
arashdalir Aug 24, 2022
3a17686
Merge remote-tracking branch 'origin/master' into gemik-stable
Aug 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion controls/slick.gridmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
var _gridOptions;
var _gridUid = (grid && grid.getUID) ? grid.getUID() : '';
var _isMenuOpen = false;
var _options = options;
var _self = this;
var $customTitleElm;
var $columnTitleElm;
Expand All @@ -156,6 +155,7 @@
return columnDef.name;
}
};
var _options = $.extend(true, {}, {gridMenu: _defaults}, options);

// when a grid optionally changes from a regular grid to a frozen grid, we need to destroy & recreate the grid menu
// we do this change because the Grid Menu is on the left container for a regular grid, it is however on the right container for a frozen grid
Expand Down
176 changes: 172 additions & 4 deletions cypress/integration/example-checkbox-header-row.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Example - Checkbox Header Row', () => {
});

it('should click on Select All and display previous and new selected rows', () => {
const expectedRows = '1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99';
const expectedRows = '1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149';

cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.click({ force: true });
Expand All @@ -82,20 +82,188 @@ describe('Example - Checkbox Header Row', () => {
});

it('should click on Select All again and expect no new selected rows', () => {
const expectedPreviousRows = '1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99';
const expectedPreviousRows = '1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149';

cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.click({ force: true });

cy.get('#selectedRows')
.invoke('text').then((text => {
.invoke('text').then((text => {
expect(text.trim()).to.eq('')
}));
}));

cy.window().then((win) => {
expect(win.console.log).to.have.callCount(2);
expect(win.console.log).to.be.calledWith(`Previously Selected Rows: ${expectedPreviousRows}`);
expect(win.console.log).to.be.calledWith('Selected Rows: ');
});
});

it('Should display "Showing page 1 of 6" text after changing Pagination to 25 items per page', () => {
cy.get('.ui-icon-lightbulb')
.click();

cy.get('.slick-pager-settings-expanded')
.should('be.visible');

cy.get('.slick-pager-settings-expanded')
.contains('25')
.click();

cy.get('.slick-pager-status')
.contains('Showing page 1 of 6');
});

it('should click on "Select All" checkbox and expect all rows selected in current page', () => {
const expectedRows = '1,3,5,7,9,11,13,15,17,19,21,23';

cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.click({ force: true });

cy.get('#selectedRows')
.contains(expectedRows);

cy.window().then((win) => {
expect(win.console.log).to.have.callCount(2);
expect(win.console.log).to.be.calledWith('Previously Selected Rows: ');
expect(win.console.log).to.be.calledWith(`Selected Rows: ${expectedRows}`);
});
});

it('should go to next page and still expect all rows selected in current page', () => {
cy.get('.ui-icon-seek-next')
.click();

cy.get('.slick-cell-checkboxsel input:checked')
.should('have.length', 11);
});

it('should go to last page and still expect all rows selected in current page', () => {
cy.get('.ui-icon-seek-end')
.click();

cy.get('.slick-cell-checkboxsel input:checked')
.should('have.length', 11);

cy.get('.slick-pager-status')
.contains('Showing page 6 of 6');

cy.get('#selectedRows')
.should('contain', '0,2,4,6,8,10,12,14,16,18,20,22,24');

cy.get('#selectedIds')
.should('contain', '9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107');
});

it('should uncheck first checkbox and expect the "Select All" button to be unchecked', () => {
cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.should('be.checked');

cy.get('.slick-row:nth(0) .slick-cell:nth(0) input[type=checkbox]')
.click({ force: true });

cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.should('not.be.checked');

cy.get('.slick-cell-checkboxsel input:checked')
.should('have.length', 10);

cy.get('#selectedRows')
.should('contain', '2,4,6,8,10,12,14,16,18,20,22,24');

cy.get('#selectedIds')
.should('contain', '9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,135,137,139,141,143,145,147,149,151,153,155,157');
});

it('should go back to first page and still expect all rows selected in current page', () => {
cy.get('.ui-icon-seek-first')
.click();

cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.should('not.be.checked');

cy.get('.slick-cell-checkboxsel input:checked')
.should('have.length', 11);

cy.get('.slick-pager-status')
.contains('Showing page 1 of 6');

cy.get('#selectedRows')
.should('contain', '1,3,5,7,9,11,13,15,17,19,21,23');

cy.get('#selectedIds')
.should('contain', '9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,135,137,139,141,143,145,147,149,151,153,155,157');
});

it('should go back to last page then re-select the first row and expect "Select All" to be checked', () => {
cy.get('.ui-icon-seek-end')
.click();

cy.get('.slick-row:nth(0) .slick-cell:nth(0) input[type=checkbox]')
.click({ force: true });

cy.get('#filter-checkbox-selectall-container input[type=checkbox]')
.should('be.checked');

cy.get('.slick-cell-checkboxsel input:checked')
.should('have.length', 11);

cy.get('.slick-pager-status')
.contains('Showing page 6 of 6');

cy.get('#selectedRows')
.should('contain', '0,2,4,6,8,10,12,14,16,18,20,22,24');

cy.get('#selectedIds')
.should('contain', '9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107');
});

it('should have lower count of selected Ids after filtering data', () => {
let prevSelectedIdsCount = 0;
let newSelectedIdsCount = 0;
let prevSelectedRowsCount = 0;
let newSelectedRowsCount = 0;

cy.get('#idsCount')
.then($elm => {
console.log($elm)
prevSelectedIdsCount = +$elm[0].textContent;
expect(prevSelectedIdsCount).to.be.greaterThan(0);
});

cy.get('#rowsCount')
.then($elm => {
console.log($elm)
prevSelectedRowsCount = +$elm[0].textContent;
expect(prevSelectedRowsCount).to.be.greaterThan(0);
expect(prevSelectedIdsCount).not.to.be.eq(prevSelectedRowsCount);
});

cy.get('.slick-pager-status')
.should('not.contain', 'Showing page 1 of 1');

cy.get('#myGrid')
.find('.slick-headerrow-column.l1.r1')
.find('input')
.type('5');

cy.get('#idsCount')
.then($elm => {
newSelectedIdsCount = +$elm[0].textContent;
expect(newSelectedIdsCount).to.be.lessThan(prevSelectedIdsCount);
});

cy.get('#rowsCount')
.then($elm => {
newSelectedRowsCount = +$elm[0].textContent;
});

cy.get('.slick-pager-status')
.then($elm => {
const pagerInfo = $elm[0].textContent;
if (pagerInfo === 'Showing page 1 of 1') {
expect(newSelectedIdsCount).to.be.eq(newSelectedRowsCount);
}
});
});
});
31 changes: 27 additions & 4 deletions examples/example-checkbox-header-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<link rel="shortcut icon" type="image/ico" href="favicon.ico" />
<link rel="stylesheet" href="../css/smoothness/jquery-ui.css" type="text/css"/>
<link rel="stylesheet" href="../slick.grid.css" type="text/css"/>
<link rel="stylesheet" href="../controls/slick.pager.css" type="text/css" />
<link rel="stylesheet" href="../controls/slick.columnpicker.css" type="text/css"/>
<link rel="stylesheet" href="examples.css" type="text/css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
Expand Down Expand Up @@ -69,6 +70,7 @@
<div style="position:relative">
<div style="width:600px;">
<div id="myGrid" style="width:100%;height:500px;"></div>
<div id="pager" style="width:100%;height:20px;"></div>
</div>

<div class="options-panel">
Expand All @@ -92,8 +94,13 @@ <h2>View Source:</h2>

<hr/>

<h3>Selected Rows:</h3>
<h3>Selected Rows (<span id="rowsCount">0</span>):</h3>
<div id="selectedRows" style="overflow-x: auto;"></div>

<hr/>

<h3>Selected Ids (<span id="idsCount">0</span>) with index/id offset=<span id="idOffset"></span>:</h3>
<div id="selectedIds" style="overflow-x: auto;"></div>
</div>
</div>

Expand All @@ -105,6 +112,7 @@ <h3>Selected Rows:</h3>

<script src="../plugins/slick.checkboxselectcolumn.js"></script>
<script src="../plugins/slick.rowselectionmodel.js"></script>
<script src="../controls/slick.pager.js"></script>
<script src="../controls/slick.columnpicker.js"></script>

<script src="../slick.core.js"></script>
Expand All @@ -126,9 +134,14 @@ <h3>Selected Rows:</h3>
var checkboxSelector;
var isSelectAllCheckboxHidden = false;
var isSelectAllShownAsColumnTitle = false;

// add an offset so that the IDs are not equal to the row number, to fully validate that DataView selected IDs work as intended
var idOffset = 8;
$('#idOffset').text(idOffset);

checkboxSelector = new Slick.CheckboxSelectColumn({
cssClass: "slick-cell-checkboxsel",
applySelectOnAllPages: true, // defaults to false, when that is enabled the "Select All" will be applied to all pages
hideInColumnTitleRow: !isSelectAllShownAsColumnTitle,
hideInFilterHeaderRow: isSelectAllShownAsColumnTitle,

Expand All @@ -142,7 +155,7 @@ <h3>Selected Rows:</h3>

for (var i = 0; i < 10; i++) {
columns.push({
id: i,
id: i + idOffset,
name: String.fromCharCode("A".charCodeAt(0) + i),
field: i,
width: 60
Expand Down Expand Up @@ -175,9 +188,9 @@ <h3>Selected Rows:</h3>
}

$(function () {
for (var i = 0; i < 100; i++) {
for (var i = 0; i < 150; i++) {
var d = (data[i] = {});
d["id"] = i;
d["id"] = i + idOffset;
for (var j = 0; j < columns.length; j++) {
d[j] = Math.round(Math.random() * 10);
}
Expand All @@ -187,7 +200,9 @@ <h3>Selected Rows:</h3>
grid = new Slick.Grid("#myGrid", dataView, columns, options);
grid.setSelectionModel(new Slick.RowSelectionModel({selectActiveRow: false}));
grid.registerPlugin(checkboxSelector);
dataView.syncGridSelection(grid, true, true);

var pager = new Slick.Controls.Pager(dataView, grid, $("#pager"));
var columnpicker = new Slick.Controls.ColumnPicker(columns, grid, options);


Expand All @@ -208,6 +223,14 @@ <h3>Selected Rows:</h3>
console.log("Previously Selected Rows: " + previousSelectedRows.toString());
console.log("Selected Rows: " + sortedSelectedRows.toString());
$('#selectedRows').text(sortedSelectedRows.toString());
$('#rowsCount').text(sortedSelectedRows.length);
});

dataView.onSelectedRowIdsChanged.subscribe(function(e, args) {
var sortedSelectedIds = args.filteredIds.sort(function (a, b) { return a - b });
// console.log("Selected Ids: " + sortedSelectedIds.toString());
$('#selectedIds').text(sortedSelectedIds.toString());
$('#idsCount').text(sortedSelectedIds.length);
});

$(grid.getHeaderRow()).on("change keyup", ":input", function (e) {
Expand Down
Loading