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

Make the Grid create a GroupDescriptor instead of a ColumnGroupDescriptor

3 Answers 44 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Omar
Top achievements
Rank 1
Omar asked on 23 Mar 2012, 06:36 PM
Is it possible to make the Grid create a GroupDescriptor instead of a ColumnGroupDescriptor? I modified the header of the grid columns to have buttons that perform actions when the user clicks on them. Now when the user groups by a column I can see the buttons on the grouppanel as well.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 26 Mar 2012, 06:59 AM
Hi,

 Can you post more info why ColumnGroupDescriptor will not work for you? 

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Omar
Top achievements
Rank 1
answered on 26 Mar 2012, 02:52 PM
Thanks so much for your response.

CoulmnGroupDescriptors are not working for me because I modified the column header to show some buttons and these buttons appear in the group panel as well. I noticed that they don't appear when using GroupDescriptors.

Screenshot attached.


0
Nedyalko Nikolov
Telerik team
answered on 29 Mar 2012, 08:01 AM
Hi,

Generally you could handle RadGridView.Grouping event and change ColumnGroupDescriptor with GroupDescriptor, with a code similar to the following:

void radGridView_Grouping(object sender, GridViewGroupingEventArgs e)
        {
            ColumnGroupDescriptor gd = e.GroupDescriptor as ColumnGroupDescriptor;
            if (gd != null)
            {
                e.Cancel = true;
                this.radGridView.GroupDescriptors.Add(new GroupDescriptor()
                {
                    Member = gd.Column.Header.ToString()
                });
            }
        }

However I think that we should find what is the problem with ColumnGroupDescriptor. Could you send me a sample project which I can debug on my side in order to see what is going on?
Thank you in advance.

Regards,
Nedyalko Nikolov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Omar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Omar
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Share this question
or