Hiding Fields in PivotFieldList

4 posts, 0 answers
  1. Steven
    Steven avatar
    18 posts
    Member since:
    Sep 2012

    Posted 20 May 2014 Link to this post

    PivotGrid is absolutely amazing. One issue we are running into, however, is the PivotFieldList displays all the properties of the objects in the collection. Is there a way, similar to RadGridView, to hide or prevent certain fields from appearing in the list? There is very little documentation on it. Is the only solution to create a DTO object that exposes only the properties you want?
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 20 May 2014 Link to this post

    Hi Steven,

    Thank you for your kind words. We are really happy when our customers are satisfied by our controls.

    As per your question, you can use Data Annotations similar to  RadGridView - just mark the public properties that you do not want to show with Display attribute and set AutoGenerateField to false:
    //Hide Product from the UI
    [Display (AutoGenerateField=false)]
    public string Product { get; set; }

    You can find more information how to use Data Annotations with RadPivotFieldList and RadPivotGrid in our online help.

    Feel free to contact us in case you have any problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    18 posts
    Member since:
    Sep 2012

    Posted 21 May 2014 in reply to Rosen Vladimirov Link to this post

    Rosen,

    Thanks for this, I did see the DataAnnotations option but it seems, at least in the docs, to be for the LocalDataSourceProvider only. I should have mentioned we are using the Queryable Data Provider and entity classes that are auto-generated by EntityFramework so they include fields like the primary key, relational keys, etc - stuff we wouldn't expose to a customer and want to hide.

    In any case, we decided to use DTO objects to translate the raw POCO class into a slimmed down class that only exposes the properties we want, so that works OK. An added benefit is we can add other fields to the DTO as well for additional reporting and slicing.

    I was hoping there was a XAML option like with RadGridView where you could list the fields you want to expose in the RadPivotFieldList and then mark some as IsVisible = false (again, like the excellent RadGridView).

    Thanks!

    Steve

  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 22 May 2014 Link to this post

    Hi Steve,

    I'm glad you have resolved the issue and thank you for the valuable feedback. You can add your feature request for adding a XAML option to filter the fields, in our feedback portal, so other customers will be able to vote for it.

    You can use Data Annotations with QueryableDataProvider (we'll update our documentation for this option), by adding the annotations to your entity classes.

    Feel free to contact us in case you have any problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top