How to return mjoin?
How to return mjoin?
Not sure if I am asking this right. But trying my best. Using the example below, instead of returning a name field from the database, how would I return a mjoin value? For example, instead of d.name, something like [, ].name that would be rendered in a column?
function format ( d ) {
return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">'+
'<tr>'+
'<td>Full name:</td>'+
'<td>'+d.name+'</td>'+
'</tr>'+
'</table>';
}
Answers
Hi @nicoledramirez@hotmail.com ,
I'm not sure that I follow your question, but a good way to manipulate the data in a cell is to use
columns.render
- this can change the displayed data to be anything you want.Cheers,
Colin
I think, if I understand correctly, you want to show the array information from the Mjoin in a child row. Is that correct?
If so, then use a
for
loop inside yourformat
function to spin over thed.name
array and add add whatever HTML you want for each entry (a row per name for example?).Allan
Ok, kind of changed my game plan a bit yesterday and decided I wanted this items as a row group. Not getting results returned.
Can you give us a link to a live example, as that would help. It looks like there are missing quotes in your code. Also, unless that dataSrc function return value is matched in the data, it won't be grouping anything.