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

needs to display no of records under a group

2 Answers 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Suprodeep
Top achievements
Rank 1
Suprodeep asked on 26 Aug 2008, 03:42 PM
I just want to implement grouping in such a way that it displays on the group header the number of records on level of groups.

please suggest which property helps us to do so...Its kind of urgent    

2 Answers, 1 is accepted

Sort by
0
jan
Top achievements
Rank 1
answered on 26 Aug 2008, 06:29 PM
Hi,

I needed to implement something similar. I did it in RadGrid_PreRender event hadler:

protected void Schedules_RadGrid_PreRender(object sender, EventArgs e)

{

    int datarows = 0;

    foreach (GridGroupHeaderItem groupHeaderItem in Schedules_RadGrid.MasterTableView.GetItems(GridItemType.GroupHeader))

    {

        datarows = 0;
 

        foreach (GridDataItem childItem in groupHeaderItem.GetChildItems())

        {

            datarows++;

        }

        groupHeaderItem.DataCell.Text += " Items: " + datarows.ToString();

    }

}

I hope this can help in your case

0
Princy
Top achievements
Rank 2
answered on 27 Aug 2008, 04:32 AM
Hi Suprodeep,

You can also use the ShowGroupFooter property if you want to display the no of records under a Group in its Group footer. Go through the following help article for more details.
Column Aggregates

Shinu.
Tags
Grid
Asked by
Suprodeep
Top achievements
Rank 1
Answers by
jan
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or