It seems that onCheck function for a serverSide Datatable it repaints the whole Datatable so the selected row is colored until Datatable repaint itself.
If you mean reloading while filtering (using “serverFilter”), then yes, all client-side changes will be lost. But onCheck doesn’t repaint the datatable, AFAICS. Can you provide a sample?
To preserve the highlighting/selection, you need to update the item itself:
save:"data.php",
on:{
onCheck: function(row, column, state){
// assuming that column corresponds to the boolean data attribute
if (state) this.updateItem(row, {$css:"row-marked", column:state})
else this.updateItem(row, {$css:"", column:state})
}
}