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

Grid PageIndexchanged not firing from dynamic usercontrol

1 Answer 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sayak
Top achievements
Rank 1
sayak asked on 27 Sep 2010, 11:00 PM
Hi ,
  I have a user control containing a radgrid that is dynamically loaded into a RadAjaxpanel.
I have paging enabled. When I click on the 2nd page the grid disappers. I read that I need to rebind the grid again in PageiNdexchanged event for the grid to appear. But the event is not firing at all. Please help. It is urgent that I get this working at the earliest.

Thanks,
Sayak

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 29 Sep 2010, 03:45 PM
Hello sayak,

If you have RadGrid's databinding mechanism set up properly, you do not have to rebind the grid on paging. Here a couple of steps you need to ensure:

1. Your grid uses advanced databinding using the NeedDataSource event

2. You create your dynamic user control early enough for the postback events to take place and you ensure the control is properly recreated on postback before ViewState is restored to the controls collection.

If you share some sample code we can examine, we may be able to identify what exactly is causing this issue and give more specific suggestions for improvement. For now, it seems either the grid is not properly databound, or the entire user control is not recreated on postback.

Veli
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
sayak
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or