How to select current page's rows only in ngx data table in angular5
I am using ngx-data table and using checkbox type of ngx-data table. I want to select current pages rows only but it when i select-all option so it selects all rows in array. My code is here
<ngx-datatable-column [width]="50" [sortable]="false" [canAutoResize]="false" [draggable]="false" [resizeable]="false">
<ng-template class="datatable-checkbox" ngx-datatable-header-template let-value="value" let-allRowsSelected="allRowsSelected"
let-selectFn="selectFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="allRowsSelected" (change)="selectFn(!allRowsSelected)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
<ng-template class="datatable-checkbox" ngx-datatable-cell-template let-value="value" let-isSelected="isSelected" let-onCheckboxChangeFn="onCheckboxChangeFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="isSelected" (change)="onCheckboxChangeFn($event)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
</ngx-datatable-column>
How can i select only current page rows only on select-all option?
javascript angular angular5 ngx-datatable
add a comment |
I am using ngx-data table and using checkbox type of ngx-data table. I want to select current pages rows only but it when i select-all option so it selects all rows in array. My code is here
<ngx-datatable-column [width]="50" [sortable]="false" [canAutoResize]="false" [draggable]="false" [resizeable]="false">
<ng-template class="datatable-checkbox" ngx-datatable-header-template let-value="value" let-allRowsSelected="allRowsSelected"
let-selectFn="selectFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="allRowsSelected" (change)="selectFn(!allRowsSelected)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
<ng-template class="datatable-checkbox" ngx-datatable-cell-template let-value="value" let-isSelected="isSelected" let-onCheckboxChangeFn="onCheckboxChangeFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="isSelected" (change)="onCheckboxChangeFn($event)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
</ngx-datatable-column>
How can i select only current page rows only on select-all option?
javascript angular angular5 ngx-datatable
add a comment |
I am using ngx-data table and using checkbox type of ngx-data table. I want to select current pages rows only but it when i select-all option so it selects all rows in array. My code is here
<ngx-datatable-column [width]="50" [sortable]="false" [canAutoResize]="false" [draggable]="false" [resizeable]="false">
<ng-template class="datatable-checkbox" ngx-datatable-header-template let-value="value" let-allRowsSelected="allRowsSelected"
let-selectFn="selectFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="allRowsSelected" (change)="selectFn(!allRowsSelected)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
<ng-template class="datatable-checkbox" ngx-datatable-cell-template let-value="value" let-isSelected="isSelected" let-onCheckboxChangeFn="onCheckboxChangeFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="isSelected" (change)="onCheckboxChangeFn($event)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
</ngx-datatable-column>
How can i select only current page rows only on select-all option?
javascript angular angular5 ngx-datatable
I am using ngx-data table and using checkbox type of ngx-data table. I want to select current pages rows only but it when i select-all option so it selects all rows in array. My code is here
<ngx-datatable-column [width]="50" [sortable]="false" [canAutoResize]="false" [draggable]="false" [resizeable]="false">
<ng-template class="datatable-checkbox" ngx-datatable-header-template let-value="value" let-allRowsSelected="allRowsSelected"
let-selectFn="selectFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="allRowsSelected" (change)="selectFn(!allRowsSelected)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
<ng-template class="datatable-checkbox" ngx-datatable-cell-template let-value="value" let-isSelected="isSelected" let-onCheckboxChangeFn="onCheckboxChangeFn">
<div class="checkbox-fade fade-in-default datatable-header-cell-label">
<label>
<input type="checkbox" [checked]="isSelected" (change)="onCheckboxChangeFn($event)" />
<span class="cr">
<i class="cr-icon icofont icofont-ui-check txt-primary"></i>
</span>
</label>
</div>
</ng-template>
</ngx-datatable-column>
How can i select only current page rows only on select-all option?
javascript angular angular5 ngx-datatable
javascript angular angular5 ngx-datatable
edited Nov 15 '18 at 6:23
Ahsan Alam Siddiqui
asked Nov 15 '18 at 6:16
Ahsan Alam SiddiquiAhsan Alam Siddiqui
219
219
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Try to use:
[selectAllRowsOnPage] true|false
In ngx docs, it says:
Property to which you can use for determining select all rows on
current page or not.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313484%2fhow-to-select-current-pages-rows-only-in-ngx-data-table-in-angular5%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try to use:
[selectAllRowsOnPage] true|false
In ngx docs, it says:
Property to which you can use for determining select all rows on
current page or not.
add a comment |
Try to use:
[selectAllRowsOnPage] true|false
In ngx docs, it says:
Property to which you can use for determining select all rows on
current page or not.
add a comment |
Try to use:
[selectAllRowsOnPage] true|false
In ngx docs, it says:
Property to which you can use for determining select all rows on
current page or not.
Try to use:
[selectAllRowsOnPage] true|false
In ngx docs, it says:
Property to which you can use for determining select all rows on
current page or not.
edited Mar 1 at 18:44
סטנלי גרונן
1,76482245
1,76482245
answered Mar 1 at 17:28
Guilherme StellaGuilherme Stella
164
164
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313484%2fhow-to-select-current-pages-rows-only-in-ngx-data-table-in-angular5%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown