hi,
i have the following grid definition:
<igDP:XamDataGrid Grid.Row="2" Grid.ColumnSpan="2" DataSource="{Binding Adjustments, Mode=TwoWay}" RecordContainerGenerationMode="Virtualize" > <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowEdit="True" /> </igDP:XamDataGrid.FieldSettings> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="True" AddNewRecordLocation="OnBottomFixed" AllowDelete="True" SelectionTypeCell="Single" SelectionTypeField="None" SelectionTypeRecord="Single" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="Code" Label="Reason Code" Width="100" /> <igDP:Field Name="Account" Label="Financial Account" Width="200" /> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>
I do see the + sign for adding new rows, but i don't see the column headers, and nothing seems to happen after pressing + (or the columns have 0 widht)
as soon as i change AugotGenerateFields to True, it works as expected. but i don't want to auto generate fields.
Hello Rafal,
I have been looking into your issue and what I can suggest you is double checking the names of your columns in the xaml code. It seems that the behavior you are discribing appears if the names of the columns in the FieldLayout and in the data source do not match. When this happens the data cannot be associated with the FieldLayout and is not displayed. If the AutoGenerateFields are set to “True” another FieldLayout is automatically generated and this is the reason for adding row functionality works as you expected.
Please do not hesitate to ask if you have any other questions or concerns on this matter.
you are correct. i had multiple fields defined. and one did not exist on the data source.
somehow that caused the whole row not to show up
Hello Squarewave,
Thank you for your response. I am glad that you resolved your issue.