PDA

View Full Version : Paging ToolBar with Grouping



amreshra
14 Aug 2010, 7:39 AM
i use paging ToolBar in my the grid , if i group by any column in this grid and the result displayed in two page the count of the result is wrong , it display only the count of the items in the current page only.

How to fix this issue ? :-/

sven
16 Aug 2010, 7:44 AM
Are you sure your server returns the correct totalcount?

amreshra
16 Aug 2010, 7:48 AM
example
5 items for page

page 1
group 1(4 items)
item 1
item 2
item 3
item 4

group 2( 1 item)
item 5

page 2
group 2(1 item)
item 6

So how can i fix the count of items

please please i need help on it

sven
16 Aug 2010, 7:51 AM
So you dont mean the total model count in the pagingtoolbar but the count that gets shown next to the groupname? You control what gets displayed there with the GridGroupRenderer that you added to the GroupingView

amreshra
16 Aug 2010, 7:54 AM
yes as you said the count shown next to the groupname , but how can i fix it to get all the group item count from DB not from grid

sven
16 Aug 2010, 8:32 AM
You are showing the number by your own there. Your gridgrouprenderer returns what you show there. Simple return the correct number

amreshra
16 Aug 2010, 8:42 AM
how to return the correct number ??

sven
16 Aug 2010, 8:56 AM
Save the correct number for example in every model, so every model has the grouptotalnumber. Than you can access it inside the renderer.