How popular a datatable to json
How popular a datatable to json
bkfsec
Posts: 2Questions: 1Answers: 0
Hi, I have the following format Json:
[{"idComponent":1,"idComponentLabel":"C1","componentName":"COMPONENT","description":"COMPONENT","isAssignedComponent":true},
{"idComponent":2,"idComponentLabel":"C2","componentName":"COMPONENT2","description":"COMPONENT2","isAssignedComponent":true}]
as popular a datatable
This discussion has been closed.
Answers
Use
ajax.dataSrc
and set it to be an empty string. Then usecolumns.data
to tell each column what property to use for that column.See the data section of the manual for more information.
Allan
Sorry I try to be clearer. I have a String with this format
And I'm trying to populate the table as follows
First thing to note is that fnRender was removed in 1.10 so that isn't going to work. Use
columns.data
andcolumns.render
instead.Beyond that, what you have looks like it should work okay.
Allan