Disable Grouping

2 posts, 0 answers
  1. Jan Pfeffer
    Jan Pfeffer avatar
    55 posts
    Member since:
    Aug 2006

    Posted 21 Jan 2011 Link to this post

    Hey at Telerik

    I would like to turn of grouping in a radgrid with the click of a button.

    When i try to enable Grouping everything goes well.

    this

     

    .RadGrid1.ShowGroupPanel = true;

     

     

    this.RadGrid1.GroupingEnabled = true;

    I then drag a column to group by and everything works as it should.

    At last i wanna turn of grouping by calling

     

    this.RadGrid1.ShowGroupPanel = false;

     

     

    this.RadGrid1.GroupingEnabled = false;

    Grouping is not turned off properly, but only hidden. The dragged column remains in the GroupPanel. (I can see this if i enable grouping again)

    Is there any way to clear the GroupPanel of grouped items so the grouping functionality is turned off properly ?

    Sincerly Jan

  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 26 Jan 2011 Link to this post

    Hello Jan,

    I suppose you have missed to rebind the grid after making these settings which is needed in order for them to apply:
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadGrid1.GroupingEnabled = false;
        RadGrid1.ShowGroupPanel = false;
        RadGrid1.Rebind();
    }

    I hope this helps.

    Regards,
    Tsvetina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top