This is a migrated thread and some comments may be shown as answers.

Disable Grouping

1 Answer 268 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan Pfeffer
Top achievements
Rank 1
Jan Pfeffer asked on 21 Jan 2011, 02:54 PM
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

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 26 Jan 2011, 12:51 PM
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.
Tags
Grid
Asked by
Jan Pfeffer
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or