views:

39

answers:

1

Is there a matching client side event that is fired before or after OnPageIndexChanging is raised?

Such as the OnClientClick, I would like to append a script when the paging numbers / arrows are clicked.

Is it possible, of so; how?

+1  A: 

I presume you are speaking of the DataGrid/GridView component. There is no such built-in even but you can easily hook a JavaScript event handler for the pager links. Here is an example using jQuery:

$('#GridView1 td table a').live('click', function() { 
    var pagerLink = this;
})
korchev
Allright, but the pager uses some other built in javascript methods to do postbacking and stuff, is it possible to run some event with jquery After that?
Filip Ekberg
You can execute any code within the event handler. Perhaps I could be more specific if you provide more info as to what should happen when the user clicks the pager.
korchev
It's okay, i'll figure it out :) thanks
Filip Ekberg