Dynamic Column Group Summary from context menu

2 posts, 0 answers
  1. Richard Slade
    Richard Slade 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. Stefan
    Admin
    Stefan avatar
    2891 posts

    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