Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
700
grid with ability to add new rows
posted

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. 
Parents
  • 17475
    Verified Answer
    Offline posted

    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.

Reply Children