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

Radgrid only displaying First Page

1 Answer 228 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arnaud
Top achievements
Rank 1
Arnaud asked on 28 Mar 2011, 06:30 PM
I have a radgrid that i populate in the following way:

Button_Click Event
  - Create a Dataview called dvData
  - RadGrid1.DataSource = dvData
  - RadGrid1.DataBind()
End Sub

Radgrid1_NeedDataSource_Event
  - RadGrid1.DataSource = dvData
End Sub

Radgrid_PageIndexChange_Event
  - Radgrid.CurrentPageIndex = e.NewPageIndex
End Sub


When i click on "Next" or on another page's number, the grid still shows me page 1.
Can you please help?
The "Allow Paging" property is set to true for both the grid and the mastertableview.
"Allow Custom Paging" is also set to true.
Page size = 20.

Also the grid is not performing any other function than displaying data (no sorting, no filtering, no paging of course etc)

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 29 Mar 2011, 02:10 PM
Hello Arnaud,

In order to resolve the issue you are facing you should remove AllowCustomPaging="true" from your code. In case you want to use custom paging mechanism integrated in the control I recommend that you examine the online example below:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/custompaging/defaultcs.aspx

Additionally, have in mind that you should never call the DataBind() method from inside the NeedDataSource handler or mix simple data-binding mode with advanced data-binding.
Advanced data-binding

Kind regards,
Pavlina
the Telerik team
Tags
Grid
Asked by
Arnaud
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or