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

Row Number insert

$
0
0
$(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
							} );
					}
				} );
				
			} );
I want to insert row number for each row and after pagination it will be continue.but above code creating error.plz help

Viewing all articles
Browse latest Browse all 83169

Trending Articles



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