Pager (arrows) problem when databinding in Page_Load

5 posts, 0 answers
  1. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 05 Apr 2012 Link to this post

    Hello,

    I am currently replacing all our classic grids using the new ajaxGrid. Many of those pages bind the data inside the Page_Load.
    But i noticed that does break the pager when using the new ajaxGrid. The back and forward buttons aren't working anymore.

    I kinda need this to work, since its a no-go to change all the code to get this working. I did include a test project that i made to be sure this really is the cause of the problem.

    Please help me, since i've been on this for a while.

    Kind regards,

    Guido

    this is the test project (till Apr 19 / 2012)
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Apr 2012 Link to this post

    Hello Guido,

    For handling complex operations like paging, filtering etc, a better approach is to use Advanced data binding using NeedDataSource event. The following help documentation explains about this in detail.
    Advanced Data-binding (using NeedDataSource event)

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 05 Apr 2012 Link to this post

    Hello Princy,

    Thanks for your reply. But isn't this kind of a bug? Since it did work on the classic grid and its not doable to change all our grids to get this to work. We just want to convert our old grids.

  5. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 18 Jun 2012 Link to this post

    I have a solution / hack for this.
    Ill post this when it goes live on our end.
  6. Guido S
    Guido S avatar
    16 posts
    Member since:
    Aug 2009

    Posted 18 Jun 2012 Link to this post

    This is our "hack".  Enjoy!
    Just add this script to your page and you are ready to go.

    $('.rgPageFirst').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
     
    $('.rgPageNext').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
     
    $('.rgPagePrev').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
     
    $('.rgPageLast').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
     
    $('.rgCollapse').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
     
    $('.rgExpand').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
     
    $('.rgExrgNumPart').live('click', function () {
        __doPostBack(this.name, '');
        return false;
    });
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017