RadPivotFieldList: Calculated Fields and Container Nodes

3 posts, 0 answers
  1. Gianpaolo
    Gianpaolo avatar
    14 posts
    Member since:
    Nov 2013

    Posted 26 Jun 2018 Link to this post

    I have a couple questions regarding the use of RadPivotFieldList with a LocalDataSourceProvider:

    1) When I try to add a CalculatedField to the LocalDataSourceProvider at runtime, RadPivotFieldList does not refresh unless I change the ItemsSource (by setting it to null and back to the previous items source). Is there any other way to refresh the list?

    2) Is there a way to automatically expand Container Nodes in RadPivotFieldList? I tried using an implicit style targeting TreeGridRowGroupHeader but it is not working.

    Thanks,

    Gian Paolo

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2271 posts

    Posted 29 Jun 2018 Link to this post

    Hello Gian Paolo,

    I will check you requirements and get back to you a bit later today.

    Regards,
    Martin Ivanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2271 posts

    Posted 02 Jul 2018 Link to this post

    Hello Gian Paolo,

    Please excuse me for the delay.

    About the refresh of the calculated fields, with the current implementation of the pivot grid the calculated fields should be set before the ItemsSource setting. After this they can't be refresh unless you refresh the source as in your case. 

    As for expanding the collapsed nodes, doing this via a style doesn't work because the IsExpanded property is set in code which has a higher priority than a style setter. In order to achieve this requirement you can get the TreeGridRowGroupHeader elements in code and set their isExpanded property. Here is an example in code:
    private void RadPivotFieldList_Loaded(object sender, RoutedEventArgs e)
    {
        var nodes = this.FieldList.ChildrenOfType<TreeGridRowGroupHeader>();
        foreach (var node in nodes)
        {
            node.IsExpanded = true;
        }
    }
    I hope that helps.

    Regards,
    Martin Ivanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top