I have nested tables mapped to a xamdatagrid. I have created DataRelations between datatables bound to xamdatagrid.
I would like to know how not to display the datarelation name if no rows are present in the nested datatables.
I have attached a sample snapshot. In the snapshot I would like to disable displaying Sale-Purchase, Purchase-Inventory, Inventory-Sale, Inventory-Inventory
Excellent. The above suggested solution works. and does not display the datarelation name if no child records present.
Hi CR,
I have been looking into your requirement and there doesn’t seem to a way to skip levels of data , however in order to have the relations disappear when there is no inner data you can use a style targeting the ExpandableFieldRecordPresenter like so:
<Style TargetType="{x:Type igDP:ExpandableFieldRecordPresenter}" > <Setter Property="Height" Value="Auto" /> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.ChildRecords.Count}" Value="0"> <Setter Property="Height" Value="0" /> </DataTrigger> </Style.Triggers> </Style>
Please let me know, if you require any further assistance on the matter.
How about completely disabling display of any data relations name.
Petar,
Appreciate the follow-up.
Tried you suggestion this morning, and it would not work.
I'm able to display the hierarchy because of the datarelations I maintain between tables, and I need to maintain these datarelations due to updates which happen periodically on child tables which needs to bubble up to the parent table.
Are there other solutions which will just hide/collapse displaying the datarelation name if no child records present in datatable. ?
Hello CR,
I am just checking if you got this worked out, or you still require any assistance, or clarification on the matter.
If this is what you were looking for please verify the answer so it helps other users as well.