When I try to bind designtime sample data using d:DataContext nothing appears in the XamDataGrid at design time.
Why does the following not work?
<UserControl.Resources> <vm:StrategyManagerViewModel x:Key="DesignViewModel"> <vm:StrategyManagerViewModel.Strategies> <m:StrategyManagerItem Name="Test" /> <m:StrategyManagerItem Name="Test2" /> <m:StrategyManagerItem Name="Test3" /> <m:StrategyManagerItem Name="Test4" /> </vm:StrategyManagerViewModel.Strategies> </vm:StrategyManagerViewModel> </UserControl.Resources> <Grid d:DataContext="{Binding Source={StaticResource DesignViewModel}}"> <igDP:XamDataGrid x:Name="StrategyManagerDataGrid" AutoFit="True" DataSource="{Binding Strategies}" RecordLoadMode="PreloadRecords" Theme="Office2k7Black" BindToSampleData="False" IsNestedDataDisplayEnabled="False"> <igDP:XamDataGrid.Resources> </igDP:XamDataGrid.Resources> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings ExpandableFieldRecordExpansionMode="ShowExpansionIndicatorIfSiblingsExist" ExpandableFieldRecordHeaderDisplayMode="NeverDisplayHeader" /> </igDP:XamDataGrid.FieldSettings> </igDP:XamDataGrid> </Grid> </UserControl>
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Just tried it with another data model and it does work so the problem is with the data model.