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

Group By Column Area

2 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 02 Apr 2010, 06:46 PM
Is it possible to access the area where the group by columns are placed?  I'd like to add a button in there.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Apr 2010, 09:15 AM
Hi,
I guess you want to add the button in the GroupPanel. Here is the code for adding controls inside GroupPanel item.

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    GridGroupPanel panel = (GridGroupPanel)RadGrid2.GroupPanel; 
    if (panel.GroupPanelItems.Count > 0) 
    { 
        Button button = new Button(); 
        button.ID = "btnClickMe"
        button.Text = "Click Me"
        panel.GroupPanelItems[0].Controls.Add(button); 
    } 

Regards
Princy
0
Neil
Top achievements
Rank 1
answered on 05 Apr 2010, 02:00 PM
Not the GroupPanel, the area the GroupPanel / Grouped columns sits in.  If I add a button to the GroupPanel, the button is removed when I remove all the groups.
Tags
Grid
Asked by
Neil
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Neil
Top achievements
Rank 1
Share this question
or