How to Remove extra space of a Jquery datatable?
How to Remove extra space of a Jquery datatable?
Hi,
I'm using Jquery datatable and the default length(displaying no of rows) is 10.But in my Datatablei have changed it to 5 only by using below code.
var feedbackDetailsDataTable = $('#tblFeedbackList').dataTable({
'bPaginate': false,
'bLengthChange': false,
'bInfo': false,
'bProcessing': false,
'bAutoWidth': false,
'bServerSide': false,
'bFilter': false,
'bJQueryUI': true,
'sPaginationType': "full_numbers",
'iDisplayLength': 5,
'sAjaxSource': webservice,
'fnServerData': function (sSource, aoData, fnCallback) { }
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"data": srch,
"success": fnCallback
});
},
aoColumns: [
/* Day */{'sSortDataType': 'dom-text', 'sType': 'date', 'sWidth': '10%' },
/* Activity Date */{'sSortDataType': 'dom-text', 'sType': 'date', 'sWidth': '10%' },
/* Hours */{'bSortable': false, 'sWidth': '10%', 'sClass': 'alignRight' },
/* Balance */{'bSortable': false, 'sWidth': '10%', 'sClass': 'alignRight' }
]
});
This code is working fine but i am experiencing some extra space below the table(records) which is not looks good.Can anyone tell me how to remove this space.
Thanks in advance.
Saroj
I'm using Jquery datatable and the default length(displaying no of rows) is 10.But in my Datatablei have changed it to 5 only by using below code.
var feedbackDetailsDataTable = $('#tblFeedbackList').dataTable({
'bPaginate': false,
'bLengthChange': false,
'bInfo': false,
'bProcessing': false,
'bAutoWidth': false,
'bServerSide': false,
'bFilter': false,
'bJQueryUI': true,
'sPaginationType': "full_numbers",
'iDisplayLength': 5,
'sAjaxSource': webservice,
'fnServerData': function (sSource, aoData, fnCallback) { }
$.ajax({
"type": "POST",
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"url": sSource,
"data": srch,
"success": fnCallback
});
},
aoColumns: [
/* Day */{'sSortDataType': 'dom-text', 'sType': 'date', 'sWidth': '10%' },
/* Activity Date */{'sSortDataType': 'dom-text', 'sType': 'date', 'sWidth': '10%' },
/* Hours */{'bSortable': false, 'sWidth': '10%', 'sClass': 'alignRight' },
/* Balance */{'bSortable': false, 'sWidth': '10%', 'sClass': 'alignRight' }
]
});
This code is working fine but i am experiencing some extra space below the table(records) which is not looks good.Can anyone tell me how to remove this space.
Thanks in advance.
Saroj
This discussion has been closed.
Replies
Allan