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

Pager (arrows) problem when databinding in Page_Load

4 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Guido S
Top achievements
Rank 1
Guido S asked on 05 Apr 2012, 12:56 PM
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)

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Apr 2012, 01:08 PM
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.
0
Guido S
Top achievements
Rank 1
answered on 05 Apr 2012, 01:14 PM
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.

0
Guido S
Top achievements
Rank 1
answered on 18 Jun 2012, 07:31 AM
I have a solution / hack for this.
Ill post this when it goes live on our end.
0
Guido S
Top achievements
Rank 1
answered on 18 Jun 2012, 08:13 AM
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;
});
Tags
Grid
Asked by
Guido S
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Guido S
Top achievements
Rank 1
Share this question
or