Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Child grid columns are not aligned with master grid
posted

I have a grid that is using two field layouts for master/detail.

For some reason when I load them up from a saved template they align alright but when I create them the first time and expand the child record it seems to be offset by one column. i.e. the child grid is offset by -1 column.

igDp:XamDataGrid.FieldLayouts>
                <igDp:FieldLayout Key="books">
                    <igDp:FieldLayout.Fields>
                        <kodiakFields:SymbolField BindingPath="Book.PriceInfo.Symbol" Label="Symbol" ColorPath="Book.Status" BindingMode="OneWay"/>
                        <kodiakFields:SymbolField BindingPath="Book.FullName" Label="Name" ColorPath="Book.Status" Visibility="Collapsed" BindingMode="OneWay"/>
                        <kodiakFields:TradingStatusField BindingPath="Book.Status" Label="Status" BindingMode="OneWay"/>
                        <kodiakFields:QuantityField BindingPath="Book.PriceInfo.BidOrderCount" Label="B Num" BindingMode="OneWay"/>
                        <kodiakFields:QuantityField BindingPath="Book.PriceInfo.BidQuantity" Label="B Volume" ColorChanges="True" BindingMode="OneWay"/>
                        
<!--omitted for brevity-->

<igDp:FieldLayout Key="detailRows">
                    <igDp:FieldLayout.Settings >
                        <igDp:FieldLayoutSettings DataRecordCellAreaStyle="{StaticResource detailStyle}"/>
                    </igDp:FieldLayout.Settings>
                    <igDp:FieldLayout.Fields>
                        <kodiakFields:TextField Name="Symbol"/>
                        <kodiakFields:TextField Label="Name" Visibility="Collapsed"/>
                        <kodiakFields:TextField Label="Status"/>
                        <kodiakFields:TextField BindingPath="BidInfo" Label="B Num" BindingMode="OneTime"  CellStyle="{StaticResource BidDetails}"/>
                        <kodiakFields:RightAlignedTextField BindingPath="BidDisplayQuantity" Label="B Volume" BindingMode="OneTime"  CellStyle="{StaticResource BidDetails}"/>

As you can see here the B Num column in the child grid contains the B Volume number.

The master and detail grids are not bound the same property on the child object but I wouldn't think that should matter.

Also when starting it up for the first time seems to be the only time I see this issue, when loading from saved XML it does not get offset in this way.

Any ideas?

Thanks,

Valdimar

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Valdimar,

    I have been investigating into the behavior that you are seeing, but I am currently unable to reproduce a behavior where the grid misaligns its columns between a parent and child hierarchical level when essentially using the same number and label for each column. There are a couple of things jumping out at me in this case, though, and I will post them below:

    1. How are you associating your “detailRows” as your child-band in this case? Usually, a ParentFieldLayoutKey property or ParentFieldName property will need to be set.

    2. It looks like you have a few custom Field types that you are using. Are you doing anything with the positioning of those fields in the internal code for these types?

    I am attaching the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.

    If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version 18.1.20181.176 in Infragistics for WPF 2018.1.

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

    Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

    Please let me know if you have any other questions or concerns on this matter.

    XDGHierarchyAlignmentCase.zip

Children
No Data