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

Custom Paging problem - only first page has data

10 Answers 151 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 19 Sep 2008, 02:24 PM
Hi,

since some hours I try to implement my custom paging logic into the last release of RadGrid.

I set DataSource in OnNeetDataSource. Everything looks good, I set VirtualItemCount and so an. I definitely become a correct view of my data. 15 records, pagesize 10, so 2 pages, 10 and 5 records. The data is correct.

I set RadGrid1.DataSource = myview (custom BL).
When I browse to the page, this works only for the FIRST page of the grid. The second Page: Paging Footer is correct (Page 2of 2, 10-15 of 15) (!!!) But the grid is empty.

Why or how can I make sure that RadGrid will render and accept the NEW view. In the first Page (Page 1 of 1) Everything looks good !?

Thanks and Enjoy,
Chris

10 Answers, 1 is accepted

Sort by
0
Christian
Top achievements
Rank 1
answered on 19 Sep 2008, 08:48 PM
Ok, after hours I know why:

I am groupingby date. If I disable grouping everything works fine.

So, is there a way to get paging and grouping work together in a complete custom paging situation. I have no chance to use any datasource control or something else.

What´s the correct way? Because the result of my query is received correctly, it only contains the number of records for the specific page. So I think there must a way for the grid to "regroup" the new page ?!

You sample grouping and filtering is using a datasource control, so I can´t use ist because you are disabling custompaging...

Thanks!
0
Vlad
Telerik team
answered on 22 Sep 2008, 06:58 AM
Hi Christian,

In case of grouping the grid needs all data if you want to group correctly. Please check the first grid in this example to know more how to accomplish this:
http://demos.telerik.com/aspnet/Prometheus/Grid/Examples/Programming/CustomPaging/DefaultCS.aspx

Regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christian
Top achievements
Rank 1
answered on 22 Sep 2008, 07:41 AM
So if I understand correctly RagGrid needs the complete data for grouoing and paging? This is a big performance issue, no?!

We only want to group every page simply by date (just for a visual effect and a better overview). The enduser is not able to regroup or something else.

Is there a way to group every single page by a column and paging together?
We don´t need a grouping over more than one page...

Thanks!
0
Vlad
Telerik team
answered on 22 Sep 2008, 07:43 AM
Hi Christian,

You can still pass single page data and the grid will group this since this is possible in your scenario.

Regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christian
Top achievements
Rank 1
answered on 22 Sep 2008, 07:57 AM
My business logic simple wants to get pagenumber and pagesize.

I can´t use this:

int startRowIndex = (ShouldApplySortFilterOrGroup()) ?  
                0 : RadGrid1.CurrentPageIndex * RadGrid1.PageSize;  
 
            int maximumRows = (ShouldApplySortFilterOrGroup()) ?  
                MyBusinessObjectCollection1.SelectCount() : RadGrid1.PageSize;  
 

Because maximum Rows is always the pagesize. Everything is handled by the business object.

Is there a way to give page and pagesize and everything works fine with grouping? I don´t the the need to fetch the count over the complete datasource. We only want to "group" (in detail we want to give the user a better overview, no logic here):

Date
    - ID
    - ID
Date
    ...

So my thinking was that the grid will group before rendering by date for every page ?!

Thanks!
0
Vlad
Telerik team
answered on 22 Sep 2008, 08:02 AM
Hi Christian,

As I said in my previous reply you can pass DataSource to the grid according to your logic and the grid will group this data without any problem. You do not need the code from the example which illustrates how to get all data in case of grouping.

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christian
Top achievements
Rank 1
answered on 22 Sep 2008, 08:05 AM
Hmm this is my issue...
In my first post I tried to give an overview.

If I enable grouping only gthe first page is renderes correct, the second is empty but by dataview is correct 100%. If I debug I see the correct data inside the view but RagGrid ingnore it and will not display the data (view.count = 5 but Grid is empty).

Could you help me?

Thanks!
0
Rosen
Telerik team
answered on 26 Sep 2008, 04:18 PM
Hi Christian,

Indeed this behavior can be observed in current version of RadGrid control. I have passed it to our developers for further investigation. Therefore we will do our best to address it for the next version of the control. I have updated your telerik points.

Please excuse us for the inconvenience.

Greetings,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christian
Top achievements
Rank 1
answered on 01 Oct 2008, 07:51 AM
Thanks again.

Because we really need this grouping it would be super cool if you would send a message if there is a hotfix ...

Thanks!
0
Rosen
Telerik team
answered on 01 Oct 2008, 03:03 PM
Hi Christian,

The fix has been included in the latest SP2 of this year's Q2 release of RadControls For ASP.NET AJAX suite (2008.2.1001). You can download it from your Client.Net account. Please give it a spin and let us know how it goes.

Best regards,
Rosen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Christian
Top achievements
Rank 1
Vlad
Telerik team
Rosen
Telerik team
Share this question
or