Edit window does not show row selected
Edit window does not show row selected
Here is the code excerpt:
When Edit button is clicked, "initEdit" alert is displayed and the selected row is shown on console.
So I know initEdit event was fired.
Even I have editor.show(), data are not shown.
How can I display a selected row in the edit entry window?
...
editor.on('initEdit', function(e, json, data) {
var modifier = editor.modifier(); // Gets the selected row of the table
if ( modifier ) {
// Get data for this row
var table = $('#payers').DataTable();
var data = table.row( modifier ).data();
editor.show(); //Shows all fields
console.log( modifier );
console.log( data );
alert( 'initEdit' );
}
});
...
Thanks,
Karen
This discussion has been closed.
Answers
Another try.
This does not even show the alert messages for New, Edit, and Remove.
I think the object references (.b_create, .b_edit, and .b_remove) could be wrong.
How can I refer to the buttons?
.