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

RadGridView Groupby 2 Columns header format

3 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Georgios
Top achievements
Rank 1
Georgios asked on 13 Mar 2011, 05:23 PM
Hello everyone,
I'm trying to group my gridView by two columns named "Category" and "SubCategory". I'm using the following code:

GroupDescriptor descriptor = new GroupDescriptor();
descriptor.GroupNames.Add("Cateogry", ListSortDirection.Ascending);
descriptor.GroupNames.Add("SubCateogry", ListSortDirection.Ascending);
descriptor.Format = "{0}: {1}";
this.radGridView1.GroupDescriptors.Add(descriptor);

The text of the header of the grouping is like this:
Category, SubCateogory: "Value of Category", "Value of SubCategory".
What I want to do is to format the descriptor so as the output would be:
Category: "Value of Category", SubCateogory:"Value of SubCategory"
I tried to achieve this in many different ways, using expressions too, but I didn't manage anything.

Is it possible to do this using the format property or any other way?
A snapshot follows.

Thank you in Advance
Georgios

3 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 13 Mar 2011, 07:47 PM
Hello,

You should be able to achieve this using the GroupSummaryEvaluate event which allows you to format the group header row. Please have a look at this help topic for more information

If you need further help, please let me know
thanks
Richard
0
Georgios
Top achievements
Rank 1
answered on 14 Mar 2011, 10:01 AM
Thank you Richard, that was really helpful.
0
Richard Slade
Top achievements
Rank 2
answered on 14 Mar 2011, 10:04 AM
You're welcome. Glad I could be of help
Richard
Tags
GridView
Asked by
Georgios
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Georgios
Top achievements
Rank 1
Share this question
or