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

[Solved] GridGroupHeaderItem.GetChildItems returning 0

2 Answers 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marcus
Top achievements
Rank 1
Marcus asked on 13 Mar 2010, 02:33 AM
Hello again,
I'm trying to put a total item count in the group headers by using the ItemDataBound event as described in various places here.
For some reason GridGroupHeaderItem.GetChildItems() is returning 0 (not null -> "0"). I thought it might be because I'm collapsing all groups as described here: http://www.telerik.com/help/aspnet-ajax/grdcollapseallitemsongrouping.html,  but disabling this code still returns 0.
Would someone possibly have a suggestion here?

Thx in advance!
Rgds - Marcus.

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 15 Mar 2010, 01:24 PM
Hello Marcus,

You can use the <GridGroupHeaderItem>.GetChildItems().Length property to get the count of the items in the particular group.

Additionally, I suggest you examine the following help article which  illustrates how to achieve your goal:
Performing calculations in group header

Best wishes,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Marcus
Top achievements
Rank 1
answered on 15 Mar 2010, 11:58 PM
Hello Pavlina,
sorry, I should have been more specific. I was using the GetChildItems().Length property - it's returning 0.
I managed to do it declaratively using the info in the link you provided, though :)

Still strange that it would return 0 ....
Thx again!
Rgds - Marcus.
Tags
Grid
Asked by
Marcus
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Marcus
Top achievements
Rank 1
Share this question
or