Display data table in Edit Grid Component in Form - limitations?

Hi Experts

I have created data table with 7 columns that I need to display in a Form. In the Form Designer I am adding the data table through the FormFieldsCollection. When editing the form I can also see that the Edit Grid component is added to the form.

But when I run the form I cannot see the data from the data table. However I can see that there are two rows which is also the amount of rows in the data table:

image

I have then deleted one of the columns and then the data table details are shown as intended when running the form.

From what it seems there is a limitation of 6 columns in the input data table. I have tried adjusting the width of the form which does not make any difference.

Is there anywhere the supported amount of columns can be changed?

1 Like

Hello jacchr,
At the moment I’m trying to make something similar, did you manage to get a solution?
Kind Regards,
Ronald

Hi @r.a.silvamolina

It has been a while since I looked into this and the process never came into production for other reasons.

However I just looked into what I did and it seems that I got around it by converting the datatable to a JArray object. Then I add the JArray into the form in the FormFieldsCollection (as far as I recall it was important to use the same naming in both Name and Value).

In the form rather than having it to setup the form automatically based on the input in the FormFieldsCollection I have added a Data Grid where the Field Key is the object input Name.

In the grid view I have added each “column” as a Text Field using the column name as Field Key. You can edit the JSON for each text field individually in order to set the cell padding, column width, etc. Google should be your friend here.

I hope it makes sense. I have made a simple example for you to look at. Remember if you need to “update” the datatable you need to set the JArray as In/Out in the FormFieldsCollection and convert back the updated JArray to a Data Table.

TestForms.zip (27.7 KB)