Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

Pagination and sDefaultContent

$
0
0
Hi,

I have got bunch of data from server side which i am showing using amazing datatables library. Each row is supposed to have edit and delete button that doesn't come from server.This i am setting in aoColumns as mentioned below
{ "mDataProp": null, "sDefaultContent": '<input type="button" value="Edit" id="editGridRow" class="gridbtn"></input><input type="button" value="Delete" id="deleteGridRow" class="gridbtn"></input>' }

Now the user can add a new row at that time i have to override this default value to provide save and cancel functionality for the same
var newNode = $('#expiryRulesDataTable').dataTable().fnSettings().aoData[whichRow].nTr;
i get the node being added and then setting the html for the default column to required html. This also works fine.

The problem occurs when the user while adding the rows goes beyond the current page to next or latter pages which are not visible. This doesn't works and shows the default content again.
Any help would be appreciated.

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>