How to preserve the rows of the datatable even after page refresh.
How to preserve the rows of the datatable even after page refresh.
nvrulz
Posts: 3Questions: 0Answers: 0
Hi all,
I need to know a way in which we can retain the added rows of the datatable even after page refresh.I tried using "bStateSave": true but that doesnt seem to work.Following is my html page and the debugger link is http://debug.datatables.net/ezezog
@import "C:/Users/212/Documents/JQUERY/DataTables-1.9.4/DataTables-1.9.4/media/css/demo_table.css";
$(document).ready( function () { $('#table_id').dataTable({"bStateSave": true});
$('#submit').click(addrow);
} );
function addrow() {
$('#table_id').dataTable().fnAddData( [
$('#empid').val(),
$('#fname').val(),
$('#lname').val()
] );
}
EmpId:
First name:
Last name:
emp ID First Name Last Name
Can anyone provide me suggestions in this regard,Thank you in advance.
I need to know a way in which we can retain the added rows of the datatable even after page refresh.I tried using "bStateSave": true but that doesnt seem to work.Following is my html page and the debugger link is http://debug.datatables.net/ezezog
@import "C:/Users/212/Documents/JQUERY/DataTables-1.9.4/DataTables-1.9.4/media/css/demo_table.css";
$(document).ready( function () { $('#table_id').dataTable({"bStateSave": true});
$('#submit').click(addrow);
} );
function addrow() {
$('#table_id').dataTable().fnAddData( [
$('#empid').val(),
$('#fname').val(),
$('#lname').val()
] );
}
EmpId:
First name:
Last name:
emp ID First Name Last Name
Can anyone provide me suggestions in this regard,Thank you in advance.
This discussion has been closed.