Highlight Cell on click
Highlight Cell on click
I am using this https://editor.datatables.net/examples/advanced/multiItem.html example and I have hardtime to figureout a small problem.
On "Select Event" I am trying to highlight "Cell" but it is not happening.
Invoice_Table.on('select', function (e, dt, type, indexes) {
//Below Line working fine with Row Selection
Invoice_Table[type](indexes).nodes().to$().addClass('DTTT_selected');
});
Invoice_Table.on('deselect', function (e, dt, type, indexes) {
//Below Line working fine with Row Selection
Invoice_Table[type](indexes).nodes().to$().removeClass('DTTT_selected');
});
Please help me to add same class on cell selection
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Does the
DTTT_selected
class get access to the cell? Do you have CSS for that (that is the legacy class name used for the old TableTools plug-in, which was row based and didn't have an option for just cells).Can you link to a page showing the issue please?
Allan
Hi Allan,
Thanks for reply, actually I am using "DataTables" with "SmartAdmin" https://wrapbootstrap.com/theme/smartadmin-responsive-webapp-WB0573SK0 Template and by default due to some css confilict on row click it was not "highlighted" so that I use "select" and "deselect" event to add /remove "DTTT_selected" class and it was working fine when I select row and as you said it was based on old table tools
The css I found in "SmartAdmin" .css files
Dear Allan,
This problem has been solved by adding the select extension .css and .js files previously .css file was missing