Passing JSON array in via FormFieldsInputData and displaying as a grid

Hi, I have a datatable that I have converted into a JSON array and I’m passing it into a form, but how can I display it as a data grid? I can’t seem to work it out. I can see under the edit Grid component there is a templates option but I can’t seem to understand how to edit the templates to display the data. Has anyone got working examples or explain how this can be done?

Thanks

Christian

The FormFieldsInputData JSON string with grid should look like follows:

"{grid:[{field1:1,field2:""A""},{field1:2,field2:""B""}]}"

where
grid is the key of Data Grid form element
field1 is the key of first column in grid
field2 is the key of second column in grid

Note that form fields are addressed by “key” attribute (not “label”)

image
Cheers

Hi @cwedl

try this

Thanks
Ashwin S

thank you @J0ska this resolved my issue!

1 Like