Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 132805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:19:15+00:00 2026-05-11T06:19:15+00:00

Ok, I have a table, made by a GridView, and attached a tablesorter to

  • 0

Ok, I have a table, made by a GridView, and attached a tablesorter to it, it works just fine.

Then I put it inside an updatepanel, and added the code to rebind it on a postback, here is my script:

function loadEvents() { $('table[id$='gv']').tablesorter(); } $(document).ready(function() { loadEvents(); }); function reBind() {     if (Sys.WebForms.PageRequestManager) {         var prm = Sys.WebForms.PageRequestManager.getInstance();         prm.add_endRequest(function() { loadEvents(); });     } } 

Which works great, I load the gridview, sorting works.

  • I click a button that posts back, it works fine.
  • I click again and the first click works to sort, sorting it up, but it gets stuck – there – I can change columns, but it will never sort down? But then…
  • I click again, and it works fine

This continues on, working every-other click… any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:19:16+00:00Added an answer on May 11, 2026 at 6:19 am

    Your problem sounds like a server side issue – the sort only works after the table has been bound in the same request. Otherwise the event hook-up for the sort can’t find anything.

    Of course – if you have already bound the table it’s already been sorted – so now you have to get the data again.

    This sort of issue is a common problem with the horrible .Net page event model.

    Simplest fix is to make sure that your table is rebound on the ajax postback after viewstate has been loaded but before events fire, then get the data again after the event has fired. Problem is that then you’ve got your data twice.

    A better fix is to avoid using .Net’s event hook-ups in any dynamic page elements.

    These types of problems with the .Net page event model is part of the reason there’s so much interest in MVC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question for YUI experts... I have a table and I've made each cell of
I have table inside a div tab. The table has 40 rows in it
I have made a table containing an array editable (you can delete rows) by
So far i have made a table with products and its sums, according to
I have table with 50 entries (users with such details like Name Surname Location
I have table rows of data in html being filled from a CGI application.
Imagine I have table like this: id:Product:shop_id 1:Basketball:41 2:Football:41 3:Rocket:45 4:Car:86 5:Plane:86 Now, this
While trying to use LINQ to SQL I encountered several problems. I have table
I have a table with more than a millon rows. This table is used
I have a table in a SQL Server 2005 database with a trigger that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.