Make datatable row selected
Make datatable row selected

Hi,
Is there any way where we can preselect the datatable row according to user?
This discussion has been closed.
Hi,
Is there any way where we can preselect the datatable row according to user?
Replies
Here is an example. You would need to add the logic regarding the respective user. E.g. by using a modified selector: https://datatables.net/reference/api/row()
Is there any way to add a class to the datatable (tbody tr) using id and without click function?
I made all the rows in the datatable selected using $('#example tbody tr').addClass('selected');
How can i make a single row selected using id?
Thanks.
I would use the api and not native jQuery with a Data Table. Here is an unusual example. On "submitSuccess" I determine the id of a selected table row, then deselect it in order to select it again 200ms later.
Please read this https://datatables.net/manual/api
and this https://datatables.net/reference/api/