Created
September 27, 2013 19:17
-
-
Save sirneb/6733818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#counties').dataTable( { | |
"bProcessing": true, | |
"bServerSide": true, | |
"bJQueryUI": true, | |
"bAutoWidth": false, | |
"sPaginationType": "full_numbers", | |
"aoColumnDefs": [ | |
{ | |
"aTargets":[3], | |
"fnCreatedCell": function(nTd, sData, oData, iRow, iCol) | |
{ | |
$(nTd).css('text-align', 'center'); // center the link | |
}, | |
"mData": null, | |
"mRender": function( data, type, full) { | |
return '<a href="#" class="add"><i class="cus-plus" title="Add"></i>Add</a>'; | |
} | |
} | |
], | |
"sAjaxSource": "ajaxbackend.php?function=Datatable&aColumns=CountyId,Name,(SELECT StateName FROM StateOrProvince WHERE County.StateId = StateId),''&sIndexColumn=CountyId&sTable=County" | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment