Grouping single column at a time

4 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 16 Mar 2006 Link to this post



    RadGrid for ASP .NET version

    RadControls for ASP .NET AJAX version

    3.0.3 and later

    2008.1.415 and later

    .NET version

    2.0 and later

    Visual Studio version

    2005 and later

    Programming language


    Browser support

    all supported by RadGrid for ASP .NET

    all browsers supported by RadControls for ASP .NET AJAX

    To enable grouping of a single column at a time:

    1. hook the GroupsChanging event of r.a.d.grid
    2. in the respective event handler determine where the current action is dropping column in the group panel
    3. if this is the case and the GroupByExpressions collection of the grid is not empty
      - cancel the default action
      - clear the GroupByExpression collection
      - add the current expression (hold by the e.Expression argument) to that collection
    4. rebind the grid calling its Rebind() method


  2. krefftc
    krefftc avatar
    7 posts
    Member since:
    Nov 2006

    Posted 01 Feb 2007 Link to this post

    Is there source code for the .NET 1.1?
  3. Yavor
    Yavor avatar
    11 posts

    Posted 02 Feb 2007 Link to this post

    Hi Krefftc,

    Basically, the approach will be the same. The only difference would be that you will need to use NeedDataSource, instead of the AccessDataSource. The rest of the functionality is handled in the GroupsChanging event handler, as shown below:

    protected void RadGrid1_GroupsChanging(object source, GridGroupsChangingEventArgs e)  
            if (e.Action == GridGroupsChangingAction.Group)  
                if (RadGrid1.MasterTableView.GroupByExpressions.Count > 0)  
                    e.Canceled = true;  

    I hope this helps.

    Have a nice day,

    the telerik team
  4. Mohammed
    Mohammed avatar
    9 posts
    Member since:
    Jun 2009

    Posted 20 Jul 2011 Link to this post


    Can I hide the group panel.

Back to Top