jquery-tabledit
jquery-tabledit copied to clipboard
Page results
If using Datatables (SpryMedia Ltd - datatables.net) and paged results, any pages >=2 do not have any icons. How can I resolve this?
Page 1
Page 2
Hey, try to do something like that:
$('#table').on('draw.dt', function(event, settings) {
if (settings.json.recordsFiltered > 0) {
$(this).Tabledit({
url: 'http://localhost/example',
editButton: false,
deleteButton: false,
columns: {
identifier: [0, 'id'],
editable: [[1, 'example']]
},
onSuccess: function(data) {
if (data.type && data.message) {
$('.alert-container').Alertiny(data.type, data.message);
}
}
});
} else {
$(this).find('.tabledit-toolbar-column').remove();
}
});
Hi @markcell, thanks for developing such a great plugin.
I am having the same issue, and deleting the toolbar column is not sufficient, as all the editable cells have been modified on the first run of tabledit. I adapted the plugin a bit so that it adds a class to all the rows after the first run, and modified the td selectors so that on subsequent runs they ignore the rows that have the class. It works like a charm.
Are you interested in a pull request?