I have a ListGrid and need to allow users to set the values in multiple rows they have selected via a DynamicForm. When the user selects rows and clicks a button I display a form set to the same DataSource as the grid and populate the form with the editable ListGridField names. All works well and the fields show up as expected.
I then iterate over the selected grid rows using ListGrid.getSelection(), apply the form field values to the corresponding ListGridField in each row using ListGridRecord.setAttribute() and then call ListGrid.updateData(currentRow) to do the update.
Everything works fine for text fields, but I also have some "intEnum" fields. When I use ListGridRecord.setAttribute("FieldName", FormItem.getValue()) for these fields I can see in the server log that the DSRequest payload has the "intEnum" fields set to an empty object, for example MyIntEnumField:{}
I've tried changing the field type to "enum" but then I get MyIntEnumField:"1" when it should be MyIntEnumField:1
What am I doing wrong?
I then iterate over the selected grid rows using ListGrid.getSelection(), apply the form field values to the corresponding ListGridField in each row using ListGridRecord.setAttribute() and then call ListGrid.updateData(currentRow) to do the update.
Everything works fine for text fields, but I also have some "intEnum" fields. When I use ListGridRecord.setAttribute("FieldName", FormItem.getValue()) for these fields I can see in the server log that the DSRequest payload has the "intEnum" fields set to an empty object, for example MyIntEnumField:{}
I've tried changing the field type to "enum" but then I get MyIntEnumField:"1" when it should be MyIntEnumField:1
What am I doing wrong?
Comment