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

How to find out if a group is split into different pages

3 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mats
Top achievements
Rank 1
Mats asked on 09 Aug 2011, 08:20 AM
Hi!

I use grouping and paging in my grid. Sometimes a group will continue on the next page(s).

I wonder if anyone knows of a simple way to analyze a GridGroupHeaderItem to find out if the group either continues from the previous page or continues on the following page.

I know that I can analyze the DataCell.Text attribute but since my grid can be translated into several languages it might be a bit tricky.

Thanks
/Mats

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Aug 2011, 08:32 AM
Hello Mats,

Check the following demo which implements the same functionality.Hope this helps.
Grid / Client Group Load

Thanks,
Shinu.
0
Mats
Top achievements
Rank 1
answered on 09 Aug 2011, 08:53 AM
Hi Shinu,
Thanks for your quick answer but I don't think my question was clear enough.

Imagine that in the demo that you linked to I have a context menu connected to each group header item. When applying a command to a group header item I first want to programmatically (on server side) decide if the GroupHeaderItem is "broken" into several pages or not.

This is because the GridGroupHeaderItem.GetChildItems() will give different results depending on if group is "broken" or not. And I want to make different actions depending on this.

So my question is:
Do you know how to implement a function like bool IsGroupBrokenBetweenPages(GridGroupHeaderItem item) without analyzing the item.DataCell.Text attribute?

Thanks
/Mats
0
Accepted
Tsvetina
Telerik team
answered on 12 Aug 2011, 09:48 AM
Hello Mats,

There is no other way to determine whether the group continues since the calculation from the group header is done by internal methods which are not accessible through the server-side API of the grid.
Handling the text of the datacell would be the only option to check this.

Kind regards,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Mats
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mats
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or