That's it :-). The trouble with click and dblclick is that there is simply no way to tell the difference between them, so yes, the click needs disabled in order to accept dblclick.
So, I've added my custom edit button, but when I hit SAVE, the ID of the row is not passed to the server, and I get a server error.
In the API-documentation, I do not see any mention of having to pass in the ID of the row.
Editor fundamentally needs an ID on each row so it can track what rows are begin edited. Otherwise, when you submit a row to the server for updating, how would you tell the server what row it is that needs to be updated?
Replies
Allan
Now: how to disable the highlighting of rows?
comment out "sRowSelect": "multi",
Allan
In the API-documentation, I do not see any mention of having to pass in the ID of the row.
My code:
editor.buttons( [
{
"label": "Cancel",
"className":"btn btn-link",
"fn": function () {
this.close();
}
}, {
"label": "Delete",
"className":"btn btn-inverse",
"fn": function () {
this.remove( row_to_delete, 'Delete row', {
"label": "Confirm",
"fn": function () { this.submit(); }
} );
}
}
, {
"label": "Save",
"className":"btn",
"fn": function () {
this.submit();
}
}
] );
$('.table_editable tbody').on('click',function(e){
var $parent = $(e.target).parent();
editor.edit( $parent,'Edit record');
});
You don't - the ID must be on the row ( `row_to_delete` in this case) and this is what is sent to the server. Is the ID not present?
Allan
With what do I replace the string "row_to_delete"?
Allan