Row Number insert
Row Number insert
avijit
Posts: 2Questions: 0Answers: 0
[code]
$(document).ready(function() {
var oTable =$('#example').dataTable( {
"fnDrawCallback": function( oSettings ) {
table_rows = oTable.fnGetNodes();
$.each(table_rows, function(index){
$("td:eq(0)", this).html(index+1);
});
},
"bProcessing": true,
"bServerSide": true,
"bFilter": false,
"sPaginationType": "full_numbers",
"iDisplayLength": 50,
"aoColumnDefs": [
{ "sClass": "my_class1", "aTargets": [ 1 ]},
{ "sClass": "my_class", "aTargets": [ 2 ]},
{ "bSortable": false, "aTargets": [ 4 ]}
] ,
"aaSorting": [[ 0, "desc" ]],
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"sAjaxSource": "datagrid_vendor_data_avi.php",
"fnInitComplete": function () {
new FixedColumns( oTable, {
"sLeftWidth": 'relative',
"iLeftWidth": 20,
"iLeftColumns": 1
} );
}
} );
} );
[/code]
I want to insert row number for each row and after pagination it will be continue.but above code creating error.plz help
$(document).ready(function() {
var oTable =$('#example').dataTable( {
"fnDrawCallback": function( oSettings ) {
table_rows = oTable.fnGetNodes();
$.each(table_rows, function(index){
$("td:eq(0)", this).html(index+1);
});
},
"bProcessing": true,
"bServerSide": true,
"bFilter": false,
"sPaginationType": "full_numbers",
"iDisplayLength": 50,
"aoColumnDefs": [
{ "sClass": "my_class1", "aTargets": [ 1 ]},
{ "sClass": "my_class", "aTargets": [ 2 ]},
{ "bSortable": false, "aTargets": [ 4 ]}
] ,
"aaSorting": [[ 0, "desc" ]],
"sScrollY": "300px",
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"sAjaxSource": "datagrid_vendor_data_avi.php",
"fnInitComplete": function () {
new FixedColumns( oTable, {
"sLeftWidth": 'relative',
"iLeftWidth": 20,
"iLeftColumns": 1
} );
}
} );
} );
[/code]
I want to insert row number for each row and after pagination it will be continue.but above code creating error.plz help
This discussion has been closed.