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

Paging problem in hierarchial grid

2 Answers 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pramod Goutham
Top achievements
Rank 1
Pramod Goutham asked on 01 Sep 2008, 06:50 AM
Hi,

I'm using a rad hierarchial grid (Q1 2008), in which i'm using paging. The page size is set as shown in the snippet below:

<telerik:RadGrid runat="server" ID="radLinks" AutoGenerateColumns="false"  Width="100%" AllowPaging="true" PageSize="3" >
     <PagerStyle Mode="NumericPages" />

But in the child grid, paging shows erratic behavior. Suppose there are 4 records in the child grid. Then sometimes the first page shows only 1 record, the second page shows 1 more, and the last page shows the remaining 2 records. This behavior changes when I run the application each time.

Once I noticed that even though there were 5 records in the child grid, the 1st page displayed the "No records to display" message, while the 2nd and 3rd page displayed the records properly. How do I get rid of this problem?

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Sep 2008, 08:38 AM
Hello Pramod,

I tried to reproduce this behavior using our online example however everything worked fine. Do you have any custom code which may affect the grid paging?

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pramod Goutham
Top achievements
Rank 1
answered on 01 Sep 2008, 10:09 AM
Hi Vlad,

I have figured out the problem. The hierarchial grid is assigning the same paging properties to all child grids. And hence all child grids are having same number of pages, irrespective of the number of records present in the data source. I am unable to find a solution for this.

I am using a DataSet and 2 DataTable objects to bind the data source to the grid in the RadGrid_NeedDataSource event. The first DataTable (i.e, DataTable[0]) object contains data for the parent grid, and the second DataTable (i.e, DataTable[1]) object contains data for the child grid.

Regards,
Pramod
Tags
Grid
Asked by
Pramod Goutham
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Pramod Goutham
Top achievements
Rank 1
Share this question
or