Dynamic Column Group Summary from context menu

Thread is closed for posting
2 posts, 0 answers
  1. 1BC531F4-332D-4B88-97E3-6075D7A5C61E
    1BC531F4-332D-4B88-97E3-6075D7A5C61E avatar
    3000 posts
    Member since:
    May 2009

    Posted 27 Nov 2010 Link to this post

    Requirements

    RadControls version 

     Q3 2010+

    .NET version 

     4.0 (though only small changes required for backward compatibility)

    Visual Studio version 

     2010

    programming language 

     VB.NET and C#


    PROJECT DESCRIPTION
    Following a great suggestion in this forum thread about having the ability to be able to right click on a column group summary and change the aggregate, I've implemented this in an inherited RadGridView.

    A column group summary allows you to see summary information for a column, such as the sum, average etc.. Using the RadGridViewDynamicSummary project shows an easy to implement RadGridView that allows changing the aggregate function from a context menu. The items in the context menu are also dynamic delending on the column type and to enable or disable this function only requires one line of code

    Me.RadGridViewDynamicSummary1.EnableDynamicRowSummary(GridView.AggregateFunction.Max, _
              CType(Me.RadGridViewDynamicSummary1.Columns(1), GridViewDecimalColumn), _
              GridView.SummaryRowPosition.Bottom)

    The grid raises events for when the dynamic summary is added, removed or changed and can be used as a standard RadGridView when not used to display column group summary information.

    hope this is useful to someone.
    Richard
  2. F11ADD2A-840D-4563-BD9F-564CF2DD488A
    F11ADD2A-840D-4563-BD9F-564CF2DD488A avatar
    2911 posts
    Member since:
    Apr 2022

    Posted 30 Nov 2010 Link to this post

    Hello Richard,

    Thank you for providing yet another great code library project. I have updated your Telerik points accordingly.
     
    Keep up with the good work,
    Stefan
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.