AloneInTheDark
Posts: 30Questions: 7Answers: 0
Hi,
i want when i press on print button the output is the result of ajax called.
How can i make it?
This discussion has been closed.
Replies
There is no option for that in Buttons. You would need to create a custom button that functions the way you want.
Allan
Hi,
this is my button. How can i get the selected row?
Code
$.fn.dataTable.ext.buttons.customprint = {
className: 'buttons-alert',
action: function ( e, dt, node, config )
{
[..] /// how can get the selected row?
}
};
Use the
selected
option forselector-modifier
. See the Select API documentation for details. edit correct link!Allan
Hi, Allan
tnk OK.....
How can disable button on load page? And enable it when user select the row?
Tnk
Solution:
This is correct - good to hear you got it working. Another option is to extend the
selected
button type which will do that, and enablement when rows are selected, for you.Allan
Hi,
how can enable when user select a row?
Like edit, delete button.....
You could listen for
selected
, or just use the button I suggested above.Allan