I am having some issues in displaying nested data in the xaml datagrid.
I have a class similar to the following
class myclass
{
string Name{get;set;}
string Expression{get; set;}
ObservableCollection<string> Values {get;}
}
I am trying to display the grid horizotnally, however I cannot get the Values to display at all. Please see the following xaml:
<igDP:XamDataGrid Grid.Row="2" DataSource="{Binding Variables}" Theme="Office2010Blue" GroupByAreaLocation="None"> <igDP:XamDataGrid.ViewSettings> <igDP:GridViewSettings UseNestedPanels="True" Orientation="Horizontal"/> </igDP:XamDataGrid.ViewSettings> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowEdit="True" /> </igDP:XamDataGrid.FieldSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout Key="Level1"> <igDP:Field Name="Name"/> <igDP:Field Name="Expression"/> <igDP:Field Name="Level2" Label="Values"/> </igDP:FieldLayout> <igDP:FieldLayout Key="Level2" ParentFieldLayoutKey="Level1"> <igDP:FieldLayout.Settings> <igDP:FieldLayoutSettings /> </igDP:FieldLayout.Settings> <igDP:Field Name="Values"/> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>
Hello,
After some research, setting different orientation of the child FieldLayout has been determined to be a new feature request. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this feature request is FR13595.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
You can log a feature request if you like, but it won't help me. I have to solve this pretty quickly and probably have it released before you guys get the feature implemented (if).
Thanks for the help though.
Hello again,
I suggest you set the FieldLayoutSettings’s AutoGenerateFields property to False in order to get your child items, but the thing you want, to show the child records vertically, seems not to be possible because you have already set the orientation of the XamDataGrid to be Horizontal and this is applied to all its Records. If you want I can log a feature request on this behalf.
Looking forward for your reply.
Thank you Stefan, but I still have issues. I can see the place holder for each Value but no actual data is displayed in the place holder. Also, I want the Values to display vertically.
Name Name Name
Expression Expression Expression
Value1 Value1 Value1
Value2 Value2 Value 2
Using the Xaml above (with the change you suggested) I get the Values rolling out horizontally when expending the control.
Thank you for your post. I have been looking through it and I suggest you replace the Name of your third Field of the first FieldLayout with its Label, because the Fields’ Names should match with the Properties of the underlying data. In your case this field is not visible and is used only for a relation to the second level of your data. Please let me know if this helps you or you need further clarifications on this matter.
Looking Forward for your reply.