Note that there are some explanatory texts on larger screens.

plurals
  1. PORender only modified rows in html table
    primarykey
    data
    text
    <p>I have table which I am filling after sending an ajax request through jQuery. ajax request is made after every 10 seconds and it is returning a lot of data <em>(around 1000 rows - I know about pagination, but its not an option for me)</em>. Currently I am re-creating all the rows on each request. Is it possible that I can only modify the rows different from previous result set ? </p> <p>My page is caching the current result set in an array and then with each subsequent request I am comparing the new result set with the previous and on change deleting the current html table and re-creating it. The process of rendering the new HTML table is taking a lot of time and I was wondering if there is a way to reduce that. </p> <p>I have tried searching for it but couldn't find any thing related to it. I just need to know if it is possible with any jquery plugin ? or what strategy should I adopt for modifying changed rows and deleting rows that doesn't exist in the new dataset. </p> <p>EDIT: Here is the current Code that I have</p> <pre><code>var sCurrentStr = ""; var sPreviousStr = ""; var bFirstRequest = true; function OnGetListSuccess(sResponse) { //build table from the response $(xmlDoc).find('Table').each(function () { var sTitle = $(this).find('Title').text(); var dBCDate = parseStringToLocalDate($(this).find('BCDateTime').text()); var sDestination = $(this).find('DestinationName').text(); //GetLocalDateFromUTCDate var dStartDate = parseStringToLocalDate($(this).find('StartDateTime').text()); var dEndDate = parseStringToLocalDate($(this).find('EndDateTime').text()); sCurrentStr += sTitle + dBCDate + sDestination + (dStartDate.toLocaleString()) + (dEndDate.toLocaleString()); }); if (bFirsRequest) { //cache results in sPreviousStr sPreviousStr = sCurrentStr; bFirstRequest = false; } if (sCurrentStr != sPreviousStr) { $(xmlDoc).find('Table').each(function () { $('&lt;tr onclick="javascript:GetRowDetails(this)"&gt;&lt;/tr&gt;').html('&lt;td&gt;' + '1' + '&lt;/td&gt;' + '&lt;td style="width:0px;display:none" class="hiddenSearchClass"&gt;' + sCurrentStr + '&lt;/td&gt;' + '&lt;td&gt;' + sTitle + '&lt;/td&gt;' + '&lt;td&gt;' + dBCDate.toLocaleString() + '&lt;/td&gt;' + '&lt;td&gt;' + sDestination + '&lt;/td&gt;' + '&lt;td&gt;' + dStartDate.toLocaleString() + '&lt;/td&gt;' + '&lt;td&gt;' + dEndDate.toLocaleString() + '&lt;/td&gt;' ) .appendTo('#MyHTMLTable'); }); } else { //no changes ignore it sPreviousStr = sCurrentStr; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload