how to get selected data on inline button ?
how to get selected data on inline button ?
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi,
I try to get selected data on the inline button like this , but does not wrok !
// Edit record
$('#my_table').on('click', 'td.editor-edit', function (e) {
e.preventDefault();
var count = table.rows( { selected: true } ).count();
alert('count = '+count);
} );
Thanks.
Mikael
Replies
What exactly happens?
Are you using the Select extension? If not the
{ selected: true }
won't work.Please provide a link to your page are a running test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Nothing happen.
Yes select extension is set.
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
You don't see the alert message?
I built a test case for you.
http://live.datatables.net/vecodire/1/edit
The event works but the problem is it is fired before the row is selected. I added a couple lines to show how to get the row data. Is this what you are wanting?
Kevin
Thanks it work !