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

Group Header text only works in the first group

3 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Xiacon
Top achievements
Rank 1
Xiacon asked on 24 Oct 2017, 09:39 PM

I am having a problem with grouping on a grid. I have two select fields, one which shows the current group, and one which shows a count of rows.

The header text works fine on the first group, but all subsequent groups, it looks like it is just showing a template of the text.

The attached image shows the way it is coming out. I collapsed the first group so all the group headers could be seen together.

You can see that the first group shows up fine showing "Pass: ; Fields: 73". This is correct, as that first group, all of the rows have the value for the PASS field empty.

But then the subsequent two groups are wrong. Taking the second group as example, it SHOULD show "Pass: 6; Fields 1", but instead it shows "  Fields: {0}".

The below is the code for the groupbyexpressions for the grid in question.

01.<groupbyexpressions>
02.    <telerik:gridgroupbyexpression>
03.        <groupbyfields>
04.            <telerik:gridgroupbyfield fieldname="PASSNUMBER" />
05.        </groupbyfields>
06.        <selectfields>
07.            <telerik:gridgroupbyfield fieldname="PASSNUMBER" headertext="Pass" fieldalias="PASS" />
08.            <telerik:gridgroupbyfield fieldname="ROWID" headertext="Fields" fieldalias="FIELDS" aggregate="Count" />
09.        </selectfields>
10.    </telerik:gridgroupbyexpression>
11.</groupbyexpressions>

3 Answers, 1 is accepted

Sort by
0
Xiacon
Top achievements
Rank 1
answered on 25 Oct 2017, 03:02 PM
As a followup, I thought maybe it was because the PASSNUMBER field was a nullable numeric field, so I created a calculated varchar field as ISNULL(CONVERT(VARCHAR, PASSNUMBER), '-'). It still has the same problem though.
0
Xiacon
Top achievements
Rank 1
answered on 25 Oct 2017, 07:54 PM

Second followup... if I take out the second selectfield, (the aggregate one) then the grouping and headers work fine.

 

0
Eyup
Telerik team
answered on 31 Oct 2017, 07:02 AM
Hi Xiacon,

I am sending a sample RadGrid web site to demonstrate how you can add aggregates in the group headers. Please run the attached web site sample and let me know if it helps you.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Xiacon
Top achievements
Rank 1
Answers by
Xiacon
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or