You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the same way that you add field name as the class for 'th' in the header it would be helpful for customising if each 'td' also had the field name as a class. I do it at the moment via confirm_datatable_options and aoColumnDefs but it sure would be nicer if it came for free :)
I have learned recently that datatables 1.10.0 supports a key called "DT_RowData", which is sent directly to the jQuery.data() function on the row to set data-* attributes on the <tr>. For the time being, I'm going to make this the official recommendation.
I think the easiest way to accomplish this is to update the view's row-level get_record_data(obj) method to add the "DT_RowData" key to the returned dict. In the future, I'd like to add an official hook on the view to more easily facilitate this.
In the same way that you add field name as the class for 'th' in the header it would be helpful for customising if each 'td' also had the field name as a class. I do it at the moment via confirm_datatable_options and aoColumnDefs but it sure would be nicer if it came for free :)
The text was updated successfully, but these errors were encountered: