I have a xamgrid in which i have 2 Layouts. One is parent and the other is child.
<ig:XamDataGrid.FieldLayouts>
<ig:FieldLayout Key="ParentLayout">
<ig:FieldLayout.Fields>
<ig:Field Name="year"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="120" /> </ig:Field.Settings> </ig:Field> <ig:Field Name="tab_short_description"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="150" /> </ig:Field.Settings> </ig:Field> <ig:Field Name="section_short_description"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="300" /> </ig:Field.Settings> </ig:Field> <ig:Field Name="attribute"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="300" /> </ig:Field.Settings> </ig:Field> <ig:Field Name="Relation1" />
</ig:FieldLayout.Fields>
</ig:FieldLayout>
<ig:FieldLayout Key="ChildLayout">
<ig:Field Name="datestring"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="170" /> </ig:Field.Settings> </ig:Field><ig:Field Name="change_by_name"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="170" /> </ig:Field.Settings> </ig:Field> <ig:Field Name="old_value"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="220" /> </ig:Field.Settings> </ig:Field> <ig:Field Name="new_value"> <ig:Field.Settings> <ig:FieldSettings CellMinWidth="220" /> </ig:Field.Settings>
</ig:Field>
<ig:FieldLayout.Settings> <ig:FieldLayoutSettings LabelLocation="Hidden"/> </ig:FieldLayout.Settings>
<ig:FieldLayout.FieldSettings> <ig:FieldSettings AllowRecordFiltering="False" /> </ig:FieldLayout.FieldSettings> </ig:FieldLayout>
</ig:CMXamDataGrid.FieldLayouts>
How to make child layout's horizontal alignment to right so that it looks like
+ Parent ____ Layout
- Parent ____ Layout
Child Layout
Hello Nikhil,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I created a Style for the DataRecordPresenter and set its Margin using Converter in order to be able to get the layout level. This way the more the level is nested the more the margin will be. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
This works but it only sets child fieldlayout margin to 20. Is there a way that childfieldlayout horizontal alignment be set to right so that parentlayout and child layout looks right-aligned.
I can suggest you set the XamDataGrid's FieldLayoutSettings' AutoFitMode to Always. If this doesn't help you, could you please send me screenshots and more inforamtion about the result you want to achieve.