Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何向jQuery DataTables插件添加自定义行_Jquery_Ajax_Jquery Datatables - Fatal编程技术网

如何向jQuery DataTables插件添加自定义行

如何向jQuery DataTables插件添加自定义行,jquery,ajax,jquery-datatables,Jquery,Ajax,Jquery Datatables,我有一个基本的html页面,上面有一个jQuery DataTables网格。 我能 它在浏览器中显示得很好。问题是我想向每个部分添加自定义行标题。因此,行标题可以位于第3行、第8行。。我如何在DATABATE?中间动态插入行标题? getDataOverview: function ($page) { $page.find('#tblDataTable').dataTable({ "bServerSide": true, "fn

我有一个基本的html页面,上面有一个jQuery DataTables网格。 我能

它在浏览器中显示得很好。问题是我想向每个部分添加自定义行标题。因此,行标题可以位于第3行、第8行。。我如何在DATABATE?

中间动态插入行标题?
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
        });
    },
退房。您可以在回调期间确定要向其中添加标题的行,然后在符合条件的情况下注入新行。

签出。您可以在回调期间确定要向其中添加标题的行,然后在满足条件的情况下注入新行