Make the labels in the Aggregates area more uniformly legible

4 posts, 0 answers
  1. Karen
    Karen avatar
    1 posts
    Member since:
    Aug 2012

    Posted 27 Mar 2020 Link to this post

    Is there anyway to make label in the Aggregates area more uniformly legible?

    My PivotGrid has a lot of column to display.
     I make some changes: 
     
    PivotAggregateDescriptorContainer pivotAggregateDescriptorsAreaContainer = radPivotGrid.PivotGridElement.AggregateDescriptorsArea;
    pivotAggregateDescriptorsAreaContainer.FixedItemSize = true;

    And implement method:
    void radPivotGrid_AggregateDescriptorElementCreating(object sender, AggregateDescriptorElementCreatingEventArgs e)
    {
        PivotAggregateDescriptorElement aggregateElement = e.AggregateDescriptorElement;
        aggregateElement.TextWrap = true;
        aggregateElement.DrawFill = false;
    }

    The issue is that PivotAggregateDescriptorContainer  overlap PivotColumnDescriptorContainer, It doesn't see "Aggregates" label.

    Please help

    Thank you.

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4172 posts

    Posted 01 Apr 2020 Link to this post

    Hello, Karen,

    Note that the PivotGridElement.ColumnWidth property is appropriate for adjusting the aggregate area's width in order to fit the content in it.

    Before:

    After:

      this.radPivotGrid1.PivotGridElement.ColumnWidth = 150;


    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  3. Nhi
    Nhi avatar
    1 posts
    Member since:
    Dec 2012

    Posted 01 Apr 2020 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    I have many columns in report.  User cannot tell what aggregates are on report unless the hover.

    I don't want to set column width.  If I widen so much horizontally that the format of report is bad. 

    Is there any way I set vertically?  Or do something ? Please look the attached file.  

     

    Thank you
     

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4172 posts

    Posted 06 Apr 2020 Link to this post

    Hello, Nhi,  

    It seems that the mentioned file is missing. However, you can manage the PivotGridElement.ColumnHeaderHeight property and wrap the text in the aggregates as follows:

            public RadForm1()
            {
                InitializeComponent();
                this.radPivotGrid1.PivotGridElement.AggregateDescriptorElementCreating += PivotGridElement_AggregateDescriptorElementCreating;
            }
    
            private void RadForm1_Load(object sender, EventArgs e)
            { 
                this.ordersTableAdapter.Fill(this.nwindDataSet.Orders);
    
               
                this.radPivotGrid1.RowGroupDescriptions.Add(new DateTimeGroupDescription() { PropertyName = "OrderDate", Step = DateTimeStep.Year, GroupComparer = new GroupNameComparer() });
                this.radPivotGrid1.RowGroupDescriptions.Add(new DateTimeGroupDescription() { PropertyName = "OrderDate", Step = DateTimeStep.Quarter, GroupComparer = new GroupNameComparer() });
                this.radPivotGrid1.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "EmployeeID", GroupComparer = new GrandTotalComparer() });
                this.radPivotGrid1.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Freight", AggregateFunction = AggregateFunctions.Sum });
                this.radPivotGrid1.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Freight", AggregateFunction = AggregateFunctions.Average });
                this.radPivotGrid1.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "OrderDate", AggregateFunction = AggregateFunctions.Min });
                this.radPivotGrid1.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Freight", AggregateFunction = AggregateFunctions.Max });
                this.radPivotGrid1.FilterDescriptions.Add(new PropertyFilterDescription() { PropertyName = "ShipCountry", CustomName = "Country" });
               
                this.radPivotGrid1.DataSource = this.ordersBindingSource;
    
                this.radPivotGrid1.PivotGridElement.ShowFilterArea = true;
                this.radPivotGrid1.PivotGridElement.FilterAreaHeight = 45; 
    
                PivotAggregateDescriptorContainer pivotAggregateDescriptorsAreaContainer = this.radPivotGrid1.PivotGridElement.AggregateDescriptorsArea;
                pivotAggregateDescriptorsAreaContainer.FixedItemSize = false; 
                this.radPivotGrid1.PivotGridElement.ColumnHeaderHeight = 60;
            }
    
            void PivotGridElement_AggregateDescriptorElementCreating(object sender, AggregateDescriptorElementCreatingEventArgs e)
            {
                PivotAggregateDescriptorElement aggregateElement = e.AggregateDescriptorElement;
                aggregateElement.TextWrap = true;
                aggregateElement.DrawFill = false;
                aggregateElement.AutoSize = false;
                aggregateElement.Size = new Size(50, 50);
            }

    I believe that it would be suitable for your case.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top