How popular a datatable to json
How popular a datatable to json
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.dataSrcand set it to be an empty string. Then usecolumns.datato 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.dataandcolumns.renderinstead.Beyond that, what you have looks like it should work okay.
Allan