Hi,
I have a radgrid - I'm using grouping and paging both. Some of my columns use GridAggregateFunction so when I group by that column I get totals for the group.
I have a radgrid - I'm using grouping and paging both. Some of my columns use GridAggregateFunction so when I group by that column I get totals for the group.
My problem is that when the group spans 2 pages I get the totals at the end of the partial group on the first page and then totals again for the second half of the partial group on the next page.
Is there any way I can either add another row to the totals to put in the entire totals for the split group or dynamically change the page size so that a split group is no longer split but included on one page?
Any help is appreciated - thanks!
joni
8 Answers, 1 is accepted
0
Hi joni,
In the case when you have paging enabled, the aggregates will be calculated for the items available on the page only. The only straightforward option would be to alter the pagesize dynamically, in case a group spans on another page as well.
All the best,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In the case when you have paging enabled, the aggregates will be calculated for the items available on the page only. The only straightforward option would be to alter the pagesize dynamically, in case a group spans on another page as well.
All the best,
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
joni
Top achievements
Rank 1
answered on 12 May 2008, 03:15 PM
Yavor,
I was afraid of that - do you have any idea how this might be accomplished - would it be best to capture the infotmation in the RadGrid1_GroupsChanging
event? I'm just not that familiar with what's taking place behind the scenes and any clues would be appreciated - thanks.
Edited to add - what I'm thinking is that at what point is the GroupSplit information created? It has the "Showing (#items in group) of (#actual items in group) items". Is it possible to grab this information and change the page size before it's displayed? Thanks.
joni
I was afraid of that - do you have any idea how this might be accomplished - would it be best to capture the infotmation in the RadGrid1_GroupsChanging
event? I'm just not that familiar with what's taking place behind the scenes and any clues would be appreciated - thanks.
Edited to add - what I'm thinking is that at what point is the GroupSplit information created? It has the "Showing (#items in group) of (#actual items in group) items". Is it possible to grab this information and change the page size before it's displayed? Thanks.
joni
0
Hello joni,
Basically, there is no straightforward way to both preserve the present grouping functionality and dynamically alter the information. Nevertheless, there are two possible approaches to deal with this:
Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Basically, there is no straightforward way to both preserve the present grouping functionality and dynamically alter the information. Nevertheless, there are two possible approaches to deal with this:
- As mentioned previously, you can alter the page size, in the case a group spans over more than one page.
- Alternatively, you can get a reference to the groupfooter item, and in case a group spans over more than one page, re-query the database, and recalculate the information for the group.
I hope one of these approaches is suitable for you.
Sincerely yours,Yavor
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
joni
Top achievements
Rank 1
answered on 13 May 2008, 02:37 PM
Yavor,
Thanks for your reply - we are evaluating this product and really love it - this seems to be the only issue that is a drawback for us.
I was able to change the pagesize by getting the actualItemCount and groupItemsCount. It worked fine on the first page but then when I went to the second page the indexes in the PagingManager (FirstIndexInPage, LastIndexInPage) were off and it I was unable to change them directly. I guess for now I will shelve this as it will take more time than I can allocate to it right now.
If anyone else has come up with a solution for this I would be interested to hear how you've accomplished this. Thanks!
Thanks for your reply - we are evaluating this product and really love it - this seems to be the only issue that is a drawback for us.
I was able to change the pagesize by getting the actualItemCount and groupItemsCount. It worked fine on the first page but then when I went to the second page the indexes in the PagingManager (FirstIndexInPage, LastIndexInPage) were off and it I was unable to change them directly. I guess for now I will shelve this as it will take more time than I can allocate to it right now.
If anyone else has come up with a solution for this I would be interested to hear how you've accomplished this. Thanks!
0
r00tsecurity
Top achievements
Rank 1
answered on 12 May 2009, 06:07 AM
hi
I have the same issue. Did you find any solution. I guess modifying query is the best solution.
EXAMPLE
radGrid1.datasource = sqlHelper.GetPagedData(between 10-30) //brings 20 records thru 10000 records
and let's say radGrid1 is grouped.
So what we see here is just grouped data in 20 records.
what we wanna see is grouped data in 10000 records.
I have the same issue. Did you find any solution. I guess modifying query is the best solution.
EXAMPLE
radGrid1.datasource = sqlHelper.GetPagedData(between 10-30) //brings 20 records thru 10000 records
and let's say radGrid1 is grouped.
So what we see here is just grouped data in 20 records.
what we wanna see is grouped data in 10000 records.
0
joni
Top achievements
Rank 1
answered on 12 May 2009, 02:39 PM
Hi,
I never did resolve the issue. Our company decided not to go with the Telerik products and I have not done any more work on this. Sorry ! And Good Luck!!
I never did resolve the issue. Our company decided not to go with the Telerik products and I have not done any more work on this. Sorry ! And Good Luck!!
0
Hello,
I believe re-querying the database, and altering the information in the group footer is the most straightforward approach in this case. It is both relatively easy to achieve and enables you to pass the required information to the end user. I hope this is a feasible option for you.
Joni, I am not sure what your present implementation is, and how the approach falls short. The best option would be for you to open a formal support ticket, and send us the problematic code, for further review.
Best wishes,
Yavor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I believe re-querying the database, and altering the information in the group footer is the most straightforward approach in this case. It is both relatively easy to achieve and enables you to pass the required information to the end user. I hope this is a feasible option for you.
Joni, I am not sure what your present implementation is, and how the approach falls short. The best option would be for you to open a formal support ticket, and send us the problematic code, for further review.
Best wishes,
Yavor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jack Williams
Top achievements
Rank 1
answered on 24 Jul 2009, 12:11 PM
Hi
I have the same issue if any one know the answer plz let me know the answer
--Thanks
I have the same issue if any one know the answer plz let me know the answer
--Thanks