multiple data in single cell
multiple data in single cell
pankaj3145
Posts: 10Questions: 3Answers: 0
i need to insert multiple data one below other in single cell of column how to achieve it?
This discussion has been closed.
Answers
https://stackoverflow.com/questions/32088676/how-to-add-rowspan-in-jquery-datatables basically i need to achieve this but here data is hard coded my data comes from MySQL database dynamically
You could do it like this simply using html to go to the next line within the cell:
This will produce a column content like:
SomeName
(SomeCity)
thanks can you give some live example
No.
Just a screenshot
The name covers 2 lines here because column width is small. But you can change that easily.
I also get my data from MySQL via ajax. So this will work for you as well.
Here is the more complete table definition:
i dont use ajax this is how i assign value to row
if(user.getDataValue('transaction_tbls').length > 0)
for tr in user.getDataValue('transaction_tbls')
th= (tr['dataValues'])['designation']
i have multiple designations but only one designation assigns to row other shifts to right side
not sure what that means.
Please take a look at the docs: https://datatables.net/reference/option/columns.render