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

Title Row Display

6 Answers 186 Views
GridView
This is a migrated thread and some comments may be shown as answers.
min
Top achievements
Rank 1
min asked on 13 Feb 2011, 12:21 PM
When we group any column it displays grouped summary column at the top like the same way i want to display summary row for each child grid view without grouping. Is it possible ? please see the attached image and suggest me. I am evaluating your product If i can do as shown in my image???

using version RadControls for windows Q3 2010

6 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 13 Feb 2011, 03:29 PM
Hello Min,

Yes, you can do this. You are currently adding a SummaryRow to the RadGridView, and therefore to the MasterTemplate. You simply need to define the same type of SummaryRow for your child template.

For exmaple
GridViewSummaryItem summaryItemChild = new GridViewSummaryItem();
summaryItemChild.Name = "ColumnNameInChildTemplate";
summaryItemChild.Aggregate = GridAggregateFunction.Count;
GridViewSummaryRowItem summaryRowItemChild = new GridViewSummaryRowItem();
summaryRowItemChild.Add(summaryItemChild);
this.radGridView1.Templates[0].SummaryRowsTop.Add(summaryRowItemChild);

Hope that helps
Richard
0
min
Top achievements
Rank 1
answered on 14 Feb 2011, 03:01 AM
Thanks Richard,

Actually i want to display summary row at the top of header row. and want to change the background as shown in the image. Is it possible?
0
Richard Slade
Top achievements
Rank 2
answered on 14 Feb 2011, 10:24 AM
Hello Min,

In radGridView, there are data rows and system rows. The summary and header rows are system rows and these cannot be changed around. You can hide the header row altogether using
this.radGridView1.ShowColumnHeaders = false;

You will be able to change the colour of rows using the ViewRowFormatting event. Have a look at this link for more information.
You can also format the string of the group summary row. Have a look at this link for information on that.

Hope that helps. Let me know if you have further questions
Richard
0
Alexander
Telerik team
answered on 16 Feb 2011, 02:02 PM
Hello,

I would like to say in addition to the Richard's answer concerning RadGridView rows classification that there are data rows, system rows, summary rows and pinned rows. It means that actually the summary rows do not belong to the system rows. The positions of the summary and system rows cannot be swapped. If more customers request this feature, we will consider implementing it in a next release.

The order of rows of the same type can be altered, even for system rows. You can try the following approach for changing places of the 'header' and 'new' row:
this.radGridView1.MasterView.SystemRows.Move(0, 1);
this.radGridView1.MasterTemplate.Refresh();

Best regards,
Alexander
the Telerik team
0
min
Top achievements
Rank 1
answered on 17 Feb 2011, 04:00 AM
Thanks Alexander,

I was able to move system row but its only possible to swap "add new row" and "header row" i cant swap summary row. Can you provide me sample code to format radGridView as in my attached image. Please see the attached image...
0
Alexander
Telerik team
answered on 21 Feb 2011, 01:11 PM
Hello Min,

As I explained in my previous answer, the positions of system and summary rows cannot be switched. I would suggest you to format your group rows and to add to them the information from your summary rows. The custom formatting of these rows can be achieved using the ViewCellFormatting event.

I hope it helps.

Best regards,
Alexander
the Telerik team
Tags
GridView
Asked by
min
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
min
Top achievements
Rank 1
Alexander
Telerik team
Share this question
or