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

[Solved] RAD GRID Paging not working properly

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
wajira
Top achievements
Rank 1
wajira asked on 16 Apr 2009, 10:46 AM
I'm using rad grid and databind using following code. 

grdMyGrid.DataSource = myDataTable

grdMyGrid.DataBind()


For the first time it works fine.
[Record count: 18]
[Paging Size: 10]
[Pager Display as : 1 2  ]

Then I change the default contents of the 'myDataTable' data table and add more records to the  'myDataTable' data table. 
Then I re-call above code to bind that new data table. 

Thats also working fine. When there are record count more than pager size, It adds those page numbers to the pager(Page moving segment of grid). 
[Record count: 38]
[Paging Size: 10]
[Pager Display as : 1 2 3 4 ]

Again I'm changing the contents of the 'myDataTable' data table and remove many records to the  'myDataTable' data table
Then I re-call above code to bind that new data table. 

In this case, it do not hide the additional page numbers.   
[Record count: 08]
[Paging Size: 10]

[Pager SHOULD Display as : 1 ]
BUT Display it display As : 
[Pager Display as : 1 2 3 4 ]

What would be the issue?
Ur support is highly appreciated.  

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Apr 2009, 12:00 PM
Hi Wajira,

I am not sure what exactly is causing this issue. But I have noticed that you are using Simple-DataBinding techniques(calling DataBind()). I would suggest you to use AdvanceDataBinding techniques. Try populating the Grid in in the NeedDataSource event. Go through the following online demo for getting more details about AdvanceDataBinding techniques.
AdvanceDataBinding

Thanks
Princy




Tags
Grid
Asked by
wajira
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or