Ok, quindi ho una chiamata JQuery JSON. Sembra un po 'come questo.Colspan Datable Jquery su alcune righe
$('#StockInvetoryReportList').dataTable({
"filter": false,
"bLengthChange": false,
"bPaginate": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "@Url.Action("GetStockInventoryBalance", "Reports")",
"aoColumns": [{ "mData": "Date"},
{ "mData": "Name" },
{ "mData": "Quantity" },
{ "mData": "isSummary" }
],
"fnServerParams": function (aoData) {
aoData.push({ "name" : "StockNo", "value": $('#MaterialName').val() }),
{ "name": "ReportDate", "value": $('#ReportDate').val() };
}
});
e genera questa tabella:
+------------+---------+----------+------------+
| Date | Name | Quantity | Is Summary |
+------------+---------+----------+------------+
| 10/01/2015 | Wire | 500 | False |
+------------+---------+----------+------------+
| 10/05/2015 | Wire | 500 | False |
+------------+---------+----------+------------+
| 10/15/2015 | Wire | 600 | False |
+------------+---------+----------+------------+
| 10/18/2015 | Wire | 100 | False |
+------------+---------+----------+------------+
| 10/19/2015 | Wire | 200 | False |
+------------+---------+----------+------------+
| 10/31/2015 | October | 1900 | True |
+------------+---------+----------+------------+
voglio unire i primi 2 colonne se è sintesi è vero. Dovrebbe sembrare come questo.
+------------+------+----------+------------+
| Date | Name | Quantity | Is Summary |
+------------+------+----------+------------+
| 10/01/2015 | Wire | 500 | False |
+------------+------+----------+------------+
| 10/05/2015 | Wire | 500 | False |
+------------+------+----------+------------+
| 10/15/2015 | Wire | 600 | False |
+------------+------+----------+------------+
| 10/18/2015 | Wire | 100 | False |
+------------+------+----------+------------+
| 10/19/2015 | Wire | 200 | False |
+------------+------+----------+------------+
| October | 1900 | True |
+-------------------+----------+------------+
E ovviamente ci sarebbero più mesi nella lista. Il vostro aiuto sarebbe molto apprezzato
La soluzione deve utilizzare la funzione datatable? O potrebbe essere qualsiasi cosa. Anche un violino del tavolo sarebbe fantastico .. –
Usiamo la funzione datatable in tutta la nostra app e proviamo a uniformarci in tutte le pagine – TheProvost
puoi dare un esempio del JSON? – davidkonrad