jQuery DataTables: Row selection using checkboxes and Select extension

We are pleased to introduce jQuery DataTables Checkboxes extension that makes it easy to add a checkbox columns to a table.

Example

Example below shows a data table using client-side processing mode where data is received from the server using Ajax.

Name Position Office Extn. Start date Salary
Name Position Office Extn. Start date Salary

Selected rows data:


Form data as submitted to the server:


Please visit dedicated jQuery DataTables Checkboxes page to download the code, view examples and documentation.

You May Also Like

Comments

  1. Hi Michael,

    Nice plug in, works fine, and save a lot of time…

    I noticed that when I only click on a few boxes, the upon checkbox icon does show a hook [✓] as if all are selected, and not a [-] as you show on your homepage. you can check here :

    https://jsbin.com/qehoneg/edit?html,output#H:L1

    It would be nice to be able to put a checkbox in a data column with boolean or string data [true,false], and have render the checkbox in accordance with the data, checked = true, unchecked = false.

    Have an option like this

    checkboxes: 

    {

    status : true, 

    checkvalue : [true,false] (default values)

    or

    checkvalue : [“Yes”,”No”]

    or

    checkvalue : [“Y”,”N”]

    or

    checkvalue : [“important”,”not important”]

    etc…….

    },

    also to callback the result of checkbox clicking back to the datatable. When I click it, the data would change in accordance to the check box.

    what do you think about this idea ?

    best regards

  2. Hello
    In your example, when I press the Submit button, the row number is displayed in the “Selected rows data” area, whereas on my end it says: <input type=”checkbox” class=”checkbox” name=”ids[]” value=”141″>. I only want to retrieve the log number. How do I do it?

    Thanks in advance

  3. Hi. Could you please help me with an issue I’m facing with setting up your add-on to start with some checkboxes checked? I’ve created a jsFiddle for you, which you can find here: https://jsfiddle.net/princeofabyss/k5cfapzL/2/

    My data comes from the DOM, and I’m passing the IDs of the rows that need to be checked in the array params, and also I’m checking data[2] of each row and it’s contained in the array of IDs I’m passing. but still get an error that e.checkboxes is not defined.

    Thank you very much in advance for any help.

  4. Hi 

    I tried using   modifier: {selected: true} to export only selected rows, but it ends up returning empty table with only the header. Am I missing out Something?

               

                                    

  5. Nested Datatable’s checkboxes have issue. Selecting  nth row checkbox from child table is selecting primary table’s nth row checkbox.

Leave a Reply to Michael Ryvkin Cancel reply

(optional)

This site uses Akismet to reduce spam. Learn how your comment data is processed.