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

RadListView with ASP.NET DataPager - Paging not works when Listview is in User Control

1 Answer 96 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jaydeep
Top achievements
Rank 2
Jaydeep asked on 24 Jun 2015, 12:48 PM

Hello,

 I am developing ASP.NET Usercontrol which includes a RadListView with ASP.NET DataPager.

 

I tried the same example shown it following page.

 http://demos.telerik.com/aspnet-ajax/datapager/examples/raddatapagervsdatapager/defaultcs.aspx

 

I am binding the RedListView in Page_Load event of the Usercontrol with checking the IsPostBack == false value.

When I place the Usercontrol in Page and run the application. It display the first page perfectly but when I change the Page using the pager the RadListView control will be hide and all data is cleared out.

 I also tried by removing the IsPostBack condition and found that when I click on 2nd page it display the double records then the defined Pagesize. Same with the 3rd page, it display the 3 times more records then the pagesize.

 

I replaced the ASP.NET DataPager with the RadDataPager but still I am facing the issue.

 

Any urgent help would be h​highly appreciated.

 

Thanks,

Jaydeep Jadav

 

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 29 Jun 2015, 06:38 AM
Hi Jaydeep,

In case you are using a simple data binding (by calling DataBind method) you need to bind the grid on each operation or in your case when page is change. Nevertheless if you use advanced data binding through NeedDataSource event handler the ListView will be automatically bind when the page is change.
Please check out the following live example which demonstrates both data binding type, so you can chose which one you want to use in your project.

Regards,
Kostadin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Jaydeep
Top achievements
Rank 2
Answers by
Kostadin
Telerik team
Share this question
or