Add a checkbox column on client-side only
Add a checkbox column on client-side only
Hi,
I'd like to add a checkbox column to a table that uses server-side processing. The checkbox column will allow the user to "rollback" any changes they have made to the row.
This table allows editing of user-submitted files. Because every file can be different, the columns are dynamically created on the client side, and the <thead> section is created during initialization of the table. In addition. not all users have update permission, so only certain users will see the checkbox column.
I have an implementation working that adds a "dummy" rollback column if the user has edit permissions. The issue with this is I need to override the AJAX call back to the server to remove the rollback column (and adjust the "order" column array.) I did the same with the "edit" AJAX call. This works, but the code feels pretty "hacky" with a bunch of if/else blocks.
I was wondering if anyone had suggestions of a better way to do this.
Answers
Live example?
Does that help ?
http://datatables.net/forums/discussion/21314/how-to-add-a-checkbox-to-a-row-adding-data-via-js#latest
I may misunderstand your problem ...