1
jQuery DataTables 그리드가있는 기본 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
});
},