Click table row to open editor lightbox for that entry?
Click table row to open editor lightbox for that entry?
Hi Allan,
I'm currently using the inline controls example of Editor (http://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html), and while I want to continue using that setup, I would also like to give users the option to click a table row and instantly open the editor lightbox for that entry. Is that possible?
I'm currently using the inline controls example of Editor (http://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html), and while I want to continue using that setup, I would also like to give users the option to click a table row and instantly open the editor lightbox for that entry. Is that possible?
This discussion has been closed.
Replies
[code]
$('#example tbody').on( 'click', 'tr', function () {
editor.edit( this, 'Edit record', {
"label": "Update",
"fn": function () { editor.submit() }
}
} );
[/code]
Allan
[code]
$('#example tbody').on( 'click', 'tr', function () {
editor.edit( this, 'Edit record', {
"label": "Update",
"fn": function () { editor.submit() }
})
});
[/code]
http://dcturanoinc.com/blog/contacts/
Allan
You can see the code on that page now.
[code]
$('#example').on( 'click', 'tbody tr', function () {
[/code]
that also will work.
Allan