Hi,
Is it possible to show a hierarchical data(another grid) on clicking of a row in a igDP:XamDataGrid?
regards
Vivek
Hello Vivek,
Thank you for your post. I have been looking through it and I attached a sample project containing a xamDataGrid with hierarchical data. By selecting a row, the child elements are expanded. Please let me know if this covers your expectations.
I am looking forward to see hearing from you.
Hi Stefan Stoyanov
Great example. That was really helpful to me!
I do have one question though. Is it possible to remove the headers from the "book-items". I have some "recursive" data that I want to display with the same headers for all rows.
Is this possible and if so, how?
Hello again,
It seems like I am missing something. Would you please send me an isolated sample project, so I will be able to investigate your issue further.
Looking forward for your reply.
Hi Stefan
I actually got the XamDataGrid working with the XAML from my previous post, I just had to simplify the code-behind. I do have a couple of questions though...
Is it possible to remove the indentation, so all the "sub-columns" align with the top-level?
I would also like to know if it is possible to bind the XamDataGrid to an MVVM model instead of using the <Grid.DataContext> XAML-tag?
I would like to be able to set the DataContext of the MainWindow-class to an instance of a class (vmMain) that exposes an ObservableCollection...
Hello Christian,
I attached a sample project showing the functionalities that you are looking for. Please let me know if this meets all your requirements or you need further assistance on this matter.
Hi Stefan,
I saw your sample - this is the functionality I need also.
In my case i have generic data and I use AutoGenerateFields = True; What could I do in this case? How to override the LabelPresenter and DataRecordPresenter styles only for the ChildRecords?
Looking forward to your suggestion,
George
Hello George,
I can suggest you use the following Styles for the LabelPresenter and DataRecordPresenter:
<Style TargetType="{x:Type igDP:LabelPresenter}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Field.Owner.IsDefault}" Value="False"> <!--Add the Setters for the LabelPresenter--> </DataTrigger> </Style.Triggers> </Style> <Style TargetType="{x:Type igDP:DataRecordPresenter}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=FieldLayout.IsDefault}" Value="False"> <!--Add the Setters for the DataRecordPresenter--> </DataTrigger> </Style.Triggers> </Style>
Which has Triggers in order to determine if the Labels and Records are from the first level or not.
Hope this helps you.
The approach I suggested you works if there are different FieldLayouts for the parent and child records, so I created a sample project for you, which works with self-reference data.
are you sure, this style applies always to the first level? In my case I have only one FieldLayout and it IsDefault.
So by me it applies to all the levels.
Is there any other Property, that one could use for triggering?
Greets,