How to alter style of layout row?
How to alter style of layout row?
I'd like to add a bootstrap class px-3 to a layout row but cannot figure out how to do so. My current config is something like this - I'd like to add the class to top1 or even top1Start and top1End
config: {
layout: {
top1Start: {
buttons: {
buttons: ['columnRestore'],
},
},
top1End: {
buttons: [
'exportCsvButton',
'printButton',
],
},
},
colReorder: true,
stateSave: true,
},
To clarify - I don't want to globally change anything, only this table in this spot.
This question has an accepted answers - jump to answer
Answers
hmmm. I found this (https://datatables.net/examples/core/layout/ids-and-classes.html) and from that derived that I must have a
featuresobject in the config. If that is present I can also set arowClass... hmmm.This is as close as you can get at the moment: https://live.datatables.net/wiwugife/1/edit .
You can't specify a class on a Bootstrap
rowelement individually. You could add it to all rows usingDataTable.ext.classes.layout.row = '...';while theclassNameorrowClassproperties will apply to the "cells" in the layout grid.Does that give you the layout you want?
Allan