我有一个基本的html页面,上面有一个jQuery DataTables网格。 我能够
它在浏览器中显示就好了。问题是我想为每个部分添加自定义行标题。因此行标题可以位于第3行,第8行......等。如何在数据表的中间动态插入行标题?
getDataOverview: function ($page) {
$page.find('#tblDataTable').dataTable({
"bServerSide": true,
"fnDrawCallback": onAfterTableLoad,
"bJQueryUI": false,
"bFilter": false,
"bPaginate": false,
"bLengthChange": false,
"oLanguage": { "sInfo": "" },
"sAjaxSource": this.getUrl($page) + '/GetDataOverview/',
"fnServerData": function (sSource, aoData, fnCallback) {
$.ajax({
dataType: 'json',
type: "POST",
url: sSource,
data: aoData,
success: fnCallback,
error: function (jqXHR, textStatus, errorThrown) { alert('Error getting data' + errorThrown) }
})
},
"bProcessing": false, // don't want to use the default progress indicator at this time
"aoColumnDefs": [
{ "sName": "ID", "aTargets": [0], "mDataProp": "ID", "bSortable": false },
{ "sName": "Name", "aTargets": [1], "mDataProp": "Name", "bSortable": false },
{ "sName": "Other", "aTargets": [2], "mDataProp": "Other", "bSortable": false }
],
"aaSorting": [[0, "asc"]] // default sort by Task Type
});
},