Display Array items in a cell
Display Array items in a cell
csk
Posts: 4Questions: 1Answers: 0
I have a response which has array in it. Right now it shows as a string, but i would like to have it as a list item in a cell.
Eg: data = {test1, test2, test3}
Right now it displays as --> test1, test2, test3
I would need it as --> test1
test2
test3
Can someone please let me know on how to achieve this?
Eg: data = {test1, test2, test3}
Right now it displays as --> test1, test2, test3
I would need it as --> test1
test2
test3
Can someone please let me know on how to achieve this?
This discussion has been closed.
Replies
[code]
mData: 'myArray',
mRender: '[
]'
[/code]
Hard to be more specific without being able to see an example, but that's the basic idea.
Allan
I have one column data which returns an array.
The solution you have provided is working if has more than one item, but when there is only one item, its splitting that.
Eg: mData = {test1, test2, test3}
Returns: test1
test2
test2
but if
mData = {test1}
Returns: t
e
s
t
1
Thanks,
Allan
Your solution works great !!
By the way, this is the first time i am using datatables, and its really great and the more important is the documentation.
I appreciate the work. So easy to use.
Allan