Select Row Checkboxes?

Select Row Checkboxes?

NilpoNilpo Posts: 1Questions: 0Answers: 0
edited June 2010 in Plug-ins
Has anyone developed a plugin that adds a checkbox to each row in a table? For example, I'd like to select and delete multiple table rows at one time.

Replies

  • iuliandumiuliandum Posts: 70Questions: 0Answers: 0
    For select multiple rows at one time you can use:

    http://datatables.net/examples/server_side/select_rows.html (for server side)

    or

    http://datatables.net/examples/api/select_row.html
  • EricTetzEricTetz Posts: 2Questions: 0Answers: 0
    edited January 2011
    I hacked together something that adds a column of checkboxes. You can select a row by clicking the checkbox... or anywhere else on the row for that matter. The checkbox may seem superfluous, but it's there as a visual reference. I added a 'select all' button at the top of that column.

    The code is probably horrible, given that I'm new to web dev, don't know JavaScript, the DOM, jQuery, *and* dataTables, but it's working if you want to take a look. I uploaded it just for you: :)

    http://tetzfiles.com/temp/datatables/
  • srayner02srayner02 Posts: 15Questions: 0Answers: 0
    EricTetz,

    how did you do this?

    What is selectableDataTable?

    $('#InventoryItems').selectableDataTable(initvalues)

    Is this part of dataTables or something you created yourself?
  • EricTetzEricTetz Posts: 2Questions: 0Answers: 0
    > Is this part of dataTables or something you created yourself?

    Something I created myself, added to the top of jquery.dataTables.js. The code was iteratively hacked into working then never revisited, so I'm sure it's terrible, but there's no much of it. Might give you a head start on implementing something like this for yourself. I updated to my latest version for you.
  • rh0diumrh0dium Posts: 14Questions: 0Answers: 0
    This is really slick. How would you use this if you wanted to use an ajax pull on top of this??
This discussion has been closed.