How to select/deselect all checkbox in DataTable using JQuery MVC

How to select/deselect all checkbox in DataTable using JQuery MVC

HermosaHermosa Posts: 3Questions: 1Answers: 0

Dear all,

I am hang on this module for few days about coding part is mistaken in DataTables MVC.

Problem:
all checkbox are get selected on current one page only when i clicked "Select all" button.
But It cannot get all selected from all pages which many records get from database.

What i want :
I have a "Select all" button and when I click on this button all the checkboxes should get selected from all pages, and when I click again on the same button all the checkboxes should get deselected from all pages.

could someone help me please?

here my coding parts on below:

add Css & script file:

View cshtml part:

JQuery part:

thanks in advance for your help.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 12,098Questions: 0Answers: 2,054
    Answer ✓

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.