Can I get rid of these pivot artifacts

3 posts, 1 answers
  1. Michael
    Michael avatar
    4 posts
    Member since:
    Aug 2018

    Posted 02 Feb Link to this post

    I'm putting up the field-list window to allow the user to choose the rows, columns and aggregations.  I'd like to hide the controls shown in the pictures I'm uploading.
  2. Answer
    Nadya
    Admin
    Nadya avatar
    510 posts

    Posted 03 Feb Link to this post

    Hello, Michael,

    In order to hide the AggregateDescriptorsAreaRowDescriptorsArea, and ColumnDescriptorsArea you can set their Visibility to Hidden. If you want to remove the ShowFiledLiest menu item from the context menu you should create a custom PivotGridContextMenu and override the AdjustItemsForContext method.

    Please refer to the following code snippet:

    public RadForm1()
    {
        InitializeComponent();
    
        this.radPivotGrid1.PivotGridElement.AggregateDescriptorsArea.Visibility = ElementVisibility.Hidden;
        this.radPivotGrid1.PivotGridElement.RowDescriptorsArea.Visibility = ElementVisibility.Hidden;
        this.radPivotGrid1.PivotGridElement.ColumnDescriptorsArea.Visibility = ElementVisibility.Hidden;
    
        MyPivotGridContextMenu menu = new MyPivotGridContextMenu(this.radPivotGrid1.PivotGridElement);
        this.radPivotGrid1.PivotGridElement.ContextMenu = menu; 
    }
    public class MyPivotGridContextMenu : PivotGridContextMenu
    {
        public MyPivotGridContextMenu(RadPivotGridElement pivotGridElement)
            : base(pivotGridElement) { }
    
        protected override void AdjustItemsForContext()
        {
            base.AdjustItemsForContext();
    
            this.Items.RemoveAt(1);
        }
    }
    

    I hope this helps. Should you have other questions do not hesitate to contact me.

    Regards,
    Nadya
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. Michael
    Michael avatar
    4 posts
    Member since:
    Aug 2018

    Posted 08 Feb in reply to Nadya Link to this post

    Thank you very much, that worked.
Back to Top