Hi,
I'm trying to format a cell with multi-lines, one line with "dt-body-center-bold dt-Edit" and the other "dt-body-center". Is this possible?
Thanks.
Use columns.className to apply the Datatables cell classes. Use columns.render to create a span tag for each line with the appropriate individual classes. Something like this: http://live.datatables.net/pobagowa/1/edit
columns.className
columns.render
span
I don't believe there is a Datatables cell class of dt-body-center-bold. See the Cell classes docs for the options.
dt-body-center-bold
Kevin
Hi Kevin,
I'm using Datatables-Editor, and based on your example I'm trying to have different css for Line 1, Line 2, possible?
Thanks, Thomas
Sorry, I'm not clear on what exactly you are trying to do. Are you wanting to display two lines in a cell, each with their own CSS? I updated my example to show this: http://live.datatables.net/pobagowa/2/edit
Or are you trying to do something when editing?
Please provide more details of what you are trying to do. Can you update my test case or provide one that shows an example of what you have with details of what you are trying to do? https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Yes, each with their own css,
Awesome, thanks!
-Thomas
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
Use
columns.className
to apply the Datatables cell classes. Usecolumns.render
to create aspan
tag for each line with the appropriate individual classes. Something like this:http://live.datatables.net/pobagowa/1/edit
I don't believe there is a Datatables cell class of
dt-body-center-bold
. See the Cell classes docs for the options.Kevin
Hi Kevin,
I'm using Datatables-Editor, and based on your example I'm trying to have different
css for Line 1, Line 2, possible?
Thanks,
Thomas
Sorry, I'm not clear on what exactly you are trying to do. Are you wanting to display two lines in a cell, each with their own CSS? I updated my example to show this:
http://live.datatables.net/pobagowa/2/edit
Or are you trying to do something when editing?
Please provide more details of what you are trying to do. Can you update my test case or provide one that shows an example of what you have with details of what you are trying to do?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Yes, each with their own css,
Awesome, thanks!
-Thomas