Group Header text only works in the first group

4 posts, 0 answers
  1. Xiacon
    Xiacon avatar
    12 posts
    Member since:
    Sep 2012

    Posted 24 Oct 2017 Link to this post

    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.

    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>
  2. Xiacon
    Xiacon avatar
    12 posts
    Member since:
    Sep 2012

    Posted 25 Oct 2017 Link to this post

    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.
  3. Xiacon
    Xiacon avatar
    12 posts
    Member since:
    Sep 2012

    Posted 25 Oct 2017 Link to this post

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


  4. Eyup
    Eyup avatar
    3901 posts

    Posted 31 Oct 2017 Link to this post

    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.

    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.
Back to Top