No longer Filters
No longer Filters
goodideadave
Posts: 12Questions: 2Answers: 0
I created a basic datatable, and the filtering/searching worked automagically. But with this definition, it seems to do the work but still shows all the original rows.
[code]
$('#UserReportRole').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": TargetUrl,
"sAjaxDataProp": "aaData",
"sScrollX": '100%',
//"sScrollXInner": "1000px",
"bScrollCollapse": true,
"bAutoWidth": false,
"sScrollY": "440px",
"bProcessing": true,
"bPaginate": false,
"bDestroy": true,
"aoColumnDefs": [
{ "mDataProp": "UserID", "sWidth": "20px", "aTargets": [0], "bUseRendered": false, "bSearchable": true,
"fnRender": function(obj) {
var str = obj.aData.UserID.toString();
return str;
}
},
{ "mDataProp": "DeleteColumn", "sWidth": "56px", "aTargets": [1], "bUseRendered": false, "bSearchable": false,
"fnRender": function(obj) {
var str = 'Delete';
return str;
}
},
{ "mDataProp": "EditColumn", "sWidth": "56px", "aTargets": [2], "bUseRendered": false, "bSearchable": false,
"fnRender": function(obj) {
var ar = [];
ar[ar.length] = "
[code]
$('#UserReportRole').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": TargetUrl,
"sAjaxDataProp": "aaData",
"sScrollX": '100%',
//"sScrollXInner": "1000px",
"bScrollCollapse": true,
"bAutoWidth": false,
"sScrollY": "440px",
"bProcessing": true,
"bPaginate": false,
"bDestroy": true,
"aoColumnDefs": [
{ "mDataProp": "UserID", "sWidth": "20px", "aTargets": [0], "bUseRendered": false, "bSearchable": true,
"fnRender": function(obj) {
var str = obj.aData.UserID.toString();
return str;
}
},
{ "mDataProp": "DeleteColumn", "sWidth": "56px", "aTargets": [1], "bUseRendered": false, "bSearchable": false,
"fnRender": function(obj) {
var str = 'Delete';
return str;
}
},
{ "mDataProp": "EditColumn", "sWidth": "56px", "aTargets": [2], "bUseRendered": false, "bSearchable": false,
"fnRender": function(obj) {
var ar = [];
ar[ar.length] = "
This discussion has been closed.
Replies
Sorry for the useless questions. This is a terrific tool, and I'm still getting familiar with it. Thanks.
I think this is a worthy subject for a blog post sometime soon... :-)
Allan