NET8 FlexGrid TreeView (ChildItemsPath), Nullable Double, and Column Aggregates

Posted by: bwui on 10 June 2024, 6:21 pm EST

  • Posted 10 June 2024, 6:21 pm EST

    Hello,

    We originally had FlexGrid from the .NET Framework version implementing the ChildItemsPath property and are attempting to implement the newly re-added ChildItemsPath property for FlexGrid for .NET 8 in the WPF 2024.1 release. After attempting to just re-enable the property on our grid in the same way we had it in the .NET Framework FlexGrid, we noticed issues with displaying child items, principally child items not displaying the expected value between the binding attached to the column and the DataItem on the child item row. Parent rows display as expected.

    After comparing our implementation to the included C1 sample HierachicalRows, we narrowed down the issue to the use of aggregate functions on columns and null values. This tracks with the issue we noticed as string columns are unaffected.

    The attached zip includes the modified files from the HierarchicalRows sample in the FlexGridExplorer project as of release 2024.1.

    *ProjectTask.cs is modified to add a series of nullable double properties, TestValue and TestAggValue, for the purpose of display and aggregation. TestValues are created from random doubles, and TestAggValue purely copies their respective TestValue. TestValue2 is initialized as null to test our use case where null values may exist.

    *HierarchicalRows.xaml.cs is modified to attach an Average aggregate property to the generated TestAggValue columns.

    *HierarchicalRows.xaml is modified to add a summary row to the footer of the grid.

    After making these changes, the TestAggValue column is broken in a similar fashion observed in our implementation, though in the sample, even top level parent rows are affected. The cells in the TestAggValue columns show the same “Avg(0.00)” text. The footer summary row also shows the same. Note with the null value, some columns are now shown as completely blank, including columns not associated with the null TestValue2. See the attached image in the zip where columns TestValue, TestValue1, and TestValue2 and their respective aggregate columns are blank even though only TestValue2 was initialized as null.

    From the .NET Framework implementation, the expected behavior is for all rows to display data based on the row’s DataItem and the respective columns’ Binding. The summary row in the footer is expected to apply the defined aggregation function(s). We saw previously in .NET Framework that cells associated with a null double would display as blank, whereas in the .NET8 implementation, we now get “NaN” text. We use a CellFactory, overriding the BindCellContent method to change these to show as blank again.

    HierarchicalRows Modified.zip

  • Posted 11 June 2024, 8:18 am EST

    Hi,

    Thanks for reporting this issue. We are able to replicate this issue at our end. This seems like a bug. So, we have escalated to the development team. Will get back to you once we have any updates from them.[Internal Tracking Id - C1XAML-36453]

    Regards,

    Nitin

  • Posted 9 July 2024, 2:29 am EST

    Hi

    This issue is resolved in the latest 2024v1 HotFix-1 release. Could you please test with the latest version?

    Please refer the attached working sample: ChildItemsPathSample.zip

    Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels