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

Paging problem in the Detail Tables of an autogenerated hierarchy Grid

2 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
frederic
Top achievements
Rank 1
frederic asked on 17 Nov 2010, 12:38 PM

Hi,

I've been experiencing a strange paging problem with an autogenerated hierarchy RadGrid...

I have 2 DataTables, let's say MonthDataTable and DayDataTable, these 2 tables are related by a DataRelation linking a key column in the MonthDataTable to a column of the DayDataTable. Everything is in a Dataset, which is the actual DataSource of my RadGrid.

I set the AutoGenerateHierarchy property of the RadGrid to "true" and it works. The resulting RadGrid displays a data row for each month with the corresponding data, and I can deploy these lines to see the data for each day for the matching month. I checked with the DataSource in debug mode, all the data are handed to the RadGrid, nothing is missing.

However, when it comes to paging in the DetailTable (DayDataTable), the number of pages is not correct. For example, I have 28 days to be displayed in the DetailTable, with a page size set to 10 -> the first page displays no child records, the second page displays 8 rows, the third page displays 10 rows and fourth one displays 10 rows. And I have 10 pages I can click on with nothing in the 1st page and on the fifth-to-tenth pages.

Here is the starter to may be understand the problem:

I have 4 rows in my MonthDataTable each corresponding to 12 rows in my DayDataTable. As a result, I have 48 rows in the DayDataTable... The resulting Grid displays 4 rows (1 for each month) that I can deploy to see the details on a daly basis.
When I allow paging in the DetailTable, all of the DetailTables display 5 pages available instead of 2 pages. Inside of these 5 pages, I find my 12 records corresponding to the matching month, as expected but in various pages and with no real logic (1st page void for example, then 8 records on the 2nd page, then 4 more records on the 3rd page...)

Plus, when I us the PagerTextFormat in the DetailTables, the value of "{4} {5}" always displays the total number of days (48), in all of the DetailTables.

I believe that the persisting 5 clickable pages on each DetailTable are there because the DetailTables always think they have the whole 48 records, while they only have 12 each...

Do you have an idea why the paging macanism could be wrong and base itself on the whole set of records, while only 12 records are present in each DetailTable ?

Thank you for your help!

2 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 18 Nov 2010, 08:15 AM
Hi frederic,

Can you send us the sample data, so that we can test this scenario locally? Also paste your RadGrid definition and any code-behind that might be related to this scenario.

Veli
the Telerik team
Browse the vast support resources we have to jumpstart 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.
0
Veli
Telerik team
answered on 18 Nov 2010, 10:51 AM
Hi frederic,

We were actually able to reproduce this issue locally, so no need for further action on your part. Our developers will investigate this issue.

Veli
the Telerik team
Browse the vast support resources we have to jumpstart 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
frederic
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or