3 Answers, 1 is accepted
0
Hi Rene,
Didie
the Telerik team
You can use the GroupCount property of the RadGridView to count the groups. As to the group header, may I ask you to share some more details on why do you need to access it?
Regards,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
ITA
Top achievements
Rank 1
answered on 30 Jul 2012, 07:52 AM
Hi,
ok, i have a RadGridView which contains 1 up to 10 Groups. In Codebehind i have to check each Group in the GridView.
For each Group i have to to somethink different, so i have to no which Groups are in the GridView.
Fas GridView contains a collection of different modules
Grid.jpg: The Grid with all possible Groups
I need somethink like
foreach(RadGridViewGroup Ggroup in RadGridView.Groups)
{
// do somethink
}
Thanks
Best Regards
Rene
ok, i have a RadGridView which contains 1 up to 10 Groups. In Codebehind i have to check each Group in the GridView.
For each Group i have to to somethink different, so i have to no which Groups are in the GridView.
Fas GridView contains a collection of different modules
Grid.jpg: The Grid with all possible Groups
I need somethink like
foreach(RadGridViewGroup Ggroup in RadGridView.Groups)
{
// do somethink
}
Thanks
Best Regards
Rene
0
Hi,
You could get the visible GroupRows using the ChildrenOfType method. An example with the first GridViewGroupRow would be:
Didie
the Telerik team
You could get the visible GroupRows using the ChildrenOfType method. An example with the first GridViewGroupRow would be:
GridViewGroupRow groupRow =
this
.clubsGrid.ChildrenOfType<GridViewGroupRow>().FirstOrDefault();
if
(groupRow !=
null
)
{
GroupViewModel groupViewModel = groupRow.GroupViewModel
as
GroupViewModel;
object
header = groupViewModel.Header;
}
Generally I would better advise you to predefine the GroupHeaderTemplate of the GridView/GridViewColumns although I am not sure if this will meet your needs. Please check the Totals WPF Demo for an example on how to predefine it.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.