Hi,
i have a datasource where the nested data has the same type like the master data. So the default display looks like this:
But we want to display the nested data just with an indent of the RecordSelector like this:
Is this possible with a style or something?
Thanks,
Bastian
Hello Bastian,
I was looking into your requirements and I can suggest you handle the LabelPresneter SizeChanged event in order to synchronize the sizes of the columns with the same names which are placed in different layouts. This will ensure that even if the user resize a field from one of the layouts the other will resize accordingly. For further reference, please have a look at the attached sample.
If you need any additional assistance on this, please feel free to ask.
I am just checking have you been able to resolve your issue? If you still need any assistance on the matter do not hesitate to ask.
Hello Elena,
in my project the master data and the nested data have the same type and share the same predefined fieldlayout which is assigned automatically by the xamdatagrid.Do i have to assign a new copy of the fieldlayout for each child level? Because when i tried to port your sample the indentation of a child level didn't changed.
Beside aligning the master data with all child levels another need is to show the child level just with the ExpansionIndicator. Is this possible?
Sincerely,Bastian
The solution I suggested change the widths of the fields from different FieldLayouts accordingly, so if all of your records are one FieldLayout this approach won’t help you achieve the desired functionality. However XamDataGrid provides the functionality you manually assign the field layouts. For further reference how you can assign different layouts to your items you can check the following link form our documentation:
http://help.infragistics.com/NetAdvantage/WPF/2011.1/CLR4.0/?page=xamDataPresenter_Manually_Assigning_a_Field_Layout_to_xamDataPresenter.html
Regarding your second question you can set the RecordSelectorLocation property of the FieldLayoutSettings to “None” in order to remove the record selector and also you can hide the FixedRecordButton like this:
<Style TargetType="{x:Type igDP:FixedRecordButton}">
<Setter Property="Width" Value="0"/>
</Style>
If this doesn’t suit your scenario, could you please provide me with a small sample that represents your situation.
Thanks in advance.
I am just following the progress of this issue. If you still have any questions on the matter, I will be glad to help.
I was looking into your requirements and I can’t see any reason that setting of the property RecordSelectorExtend won’t suit your scenario. For example you can set a specific value for every layout in your code like follows, which will even not require the using of a converter:
xamDataGrid1.FieldLayouts[0].Settings.RecordSelectorExtent = 35;
If this doesn't suit your scenario, please let me know.
i managed to achieve the layout i wanted with two fieldlayouts. One for the master data and one for the nested data.
Now that the values were aligned we are looking for "something" to display the hierarchy. So i tried to set the RecordSelectorExtent to a fixed value and wanted to move the RecordSelector or the ExpansionIndicator according to the NestedDepth property with an converter.I tried setting the margin (but it broke my layout) and setting the x-Value of Rendertransform (which had no effect at all).
Any suggestions how i can move the ExpansionIndicator or the RecordSelector inside the RecordSelectorExtend?
Thanks,Bastian