Enabling several rows selection with shift
Enabling several rows selection with shift
How can be possible to select several records in the same page with the use of "Shift" key so that you make a click on the first row and another click+shift in the last row and all the rows in the interval get selected?
Thanks in advance.
Thanks in advance.
This discussion has been closed.
Replies
This demo shows how you can do multiple user-selectable rows: http://datatables.net/examples/example_select_row.html . Changing it to select multiple rows should be fairly trivial using the e.shift parameter.
Hope this helps,
Allan
Could you provide me an example?
Thanks a lot.
The e.shift parameter is part of the event object that is passed into the click event handling function (in my example "$('#example tr').click( function() {" - this would be modified to "$('#example tr').click( function(e) {" ). I'll not write the code for you directly (unless of course you wish to contract me :-) ), but hopefully this will point you in the right direction! A google search for "javascript detect shift key" will also yield plenty of results.
Hope this helps,
Allan