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
130
XamGrid to XamDataGrid
posted

Hello,

recently I am trying to replace some simple XamGrid tables to to XamDataGrid and this seem to get complicated very easily.

for example:

with XamGrid I have 2 TemplateColumns bound to different properties of my viewmodel (It is working properly). What I like about it is that I can define the HeaderText. This seems not to be possible with XamDataGrid:

                                <igDP:XamDataGrid x:Name="xamDataGrid" DataSource="{Binding MyProperty}"  GroupByAreaLocation="None">
                                    <igDP:XamDataGrid.FieldLayoutSettings>
                                        <igDP:FieldLayoutSettings AutoGenerateFields="False"/>
                                    </igDP:XamDataGrid.FieldLayoutSettings>
                                    <igDP:XamDataGrid.FieldLayouts>
                                        <igDP:FieldLayout>
                                            <igDP:FieldLayout.Fields>
                                                <igDP:Field Name="MyProperty" Label="Header Text" />
                                            </igDP:FieldLayout.Fields>
                                        </igDP:FieldLayout>
                                    </igDP:XamDataGrid.FieldLayouts>
                                </igDP:XamDataGrid>

This is not working at all. I'm not even able to type anything.

However, if I set AutoGenerateFields="True", I am able to see the header "Value" (and I desperately want to chande the header). Most importantly, I am not able to type anything IF MyProperty is "empty", i.e. it has a default value of 0. I can only type something in when it is not empty. So for example if MyProperty was set to be 5, I can see the number and can change it. It also binds properly whenever I type in a different number. Why is that ?Thank you.

Kind regards,

Julian

Parents Reply Children
No Data