Grid PageIndexchanged not firing from dynamic usercontrol

2 posts, 0 answers
  1. sayak
    sayak avatar
    23 posts
    Member since:
    Jun 2007

    Posted 27 Sep 2010 Link to this post

    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.

  2. Veli
    Veli avatar
    2002 posts

    Posted 29 Sep 2010 Link to this post

    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.

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top