Posted 5 June 2020, 2:23 pm EST - Updated 3 October 2022, 4:12 pm EST
Dear Wijmo Team,
Using Angular 8, I’m rendering my grid with a mix of normal and grouped columns.
This is how I create the grouped columns
return {
dataType: Datatype[attribute.datentyp],
header: this.getAttributHeader(attribute, columnLevel),
columns: this.calculateSubColumns(attribute),
binding: 'attributeValue.' + attribute.id + '.content',
visible: visible,
format: format,
isReadOnly: attribute.isReadOnly,
isRequired: false,
}
Displaying and editing the grouped columns works just fine. However, when programmatically creating a new row by using “this.data.addNew()”, the objects for the grouped columns are missing in
this.flexdata.selectedItems[0].attributeValue[attribute.id]
Therefore, when trying to set
this.flexdata.selectedItems[0].attributeValue[attribute.id].content = value
I get an TypeScript error.
In the following example, when printing out row 1 or 2 in the console, there are six attributes. But when printing out the newly created row, there are only 4 attributes. The ones for “Quellattribut 1” and “Quellattribut 2” are missing.
Is there anything specific about data.addNew() that might cause this issue?
Best regards
Moritz