Aocolumns таблиц данных не работают
Please find attached the application picture, where the column ORDER ID is not showing, and instead of that, is showing the PLUS sign. So all the columns should shift for one to the right. ajax And all the time when I run the application it shows me this error message: DataTables warning (table id = 'companies'): Added data (size 3) does not match known number of columns (4)
var oTable; $('#companies tbody td img').live('click', function () { var nTr = this.parentNode.parentNode; if (this.src.match('details_close')) { /* This row is already open - close it */ this.src = "/Content/images/details_open.png"; oTable.fnClose(nTr); } else { /* Open this row */ this.src = "/Content/images/details_close.png"; var orderid = $(this).attr("rel"); $.get("Me?OrderID=" + orderid, function (detalet) { oTable.fnOpen(nTr, detalet, 'details'); }); } }); /* Initialize table and make first column non-sortable*/ oTable = $('#companies').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": 'AjaxHandler', "bJQueryUI": true, "aoColumns": [ { "bSortable": false, "bSearchable": false, "fnRender": function (oObj) { return '<img src="/Content/images/details_open.png" alt="expand/collapse" rel="' + oObj.aData[0] + '" />'; } }, null, null, null ] });
<table id="companies" class="display"> <thead> <tr> <th> </th> <th>Order ID</th> <th>Customer ID</th> <th>Ship Address</th> </tr> </thead> <tbody></tbody> </table> Run code snippet
the first column of the table should be the image img , then is order id , then is customer id , then is ship address .thats it.
Что я уже пробовал:
я только что объяснил эту проблему выше