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 7499647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:53:49+00:00 2026-05-29T19:53:49+00:00

I used jquery data table for sorting. It works fine under normal condition. If

  • 0

I used jquery data table for sorting. It works fine under normal condition. If i changed the value in run time, the sorting is not working.

This is my table data

        <table width="94%" cellpadding="2" cellspacing="1" class="tablehead" id="pls-batting">
    <thead>     
    <tr class="tab_head" align="right" id="pls-play" >
    <th width="44" align="center" ># No </th>
    </tr>
    </thead>
    <tbody>
    <tr  id="116706">
    <td align="left" id='1' >test</td>
    </tr>
    <tr id="116707">
    <td align="left" id='2'>bbb</td>
    </tr>
    <tr id="116708">
    <td align="left" id='3' >xxx</td>
    </tr>
    </tbody>
    </table>

Jquery method used for sorting is :

 $(document).ready(function() {

   $('#pls-batting').dataTable( {

            } );
  } );

By clicking the ‘# No’ head the corresponding column displayed in asc and desc order respectively. These TD values will be changed onload by using

        document.getElementById(3).innerHTML = 'something';

So as a result the 3rd column value is ‘something’. So sorting will be done by this values. But it is not working.

It takes the old values. Please help me. Thanks

  • 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. Editorial Team
    Editorial Team
    2026-05-29T19:53:50+00:00Added an answer on May 29, 2026 at 7:53 pm

    In DataTables, you should not update content of HTML cell. DT uses internal JavaScript array structure for searching/sorting and this cell is only a display value.

    To update some cell you will need to use DT fnUpdate function see http://datatables.net/api#fnUpdate. Example of updating cell in the table is:

    var oTable = $(‘#example’).dataTable();
    oTable.fnUpdate( ‘New content’, 10, 3 );

    Note that cells are referenced by row/cell positions. If you don’t know row/cell position then you can use http://datatables.net/api#fnGetPosition function to find position of TR with id 3 and use this info to update cell data using the fnGetData function (you can find example on the http://datatables.net/api#fnGetPosition)

    Jovan

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

Sidebar

Related Questions

I used jquery stepcarousel plugin and it works fine... But how to preload images
Hello first time i used jqgrid but data not loaded in UI * html
Well, I admit: I've extensively used jQuery.attr to store custom data in DOM elements
I used jquery tools tooltip and i positioned icons 30 px under flash banner
I have used JQuery for a small animation work: a table #photos contains 9
Yesterday I used jQuery UI for the first time and I think I'm going
i am doing a jquery back end search of data from a DB table..until
This is my view code I used jQuery it works and I didn't have
I am using a jquery modal dialog to display a table of data from
I working on a project that used Azure Table Storage. The data is stored

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.