give up, I do not know where is the problem

give up, I do not know where is the problem

krzychukrzychu Posts: 2Questions: 0Answers: 0
edited May 2015 in Free community support

8 columns is working properly, when added another error pops up
please help me

this is my table

                        <table id="example" class="display" cellspacing="0" width="100%">
                                <thead>
                                    <tr>
                                        <th>Lp</th>
                                        <th>Program</th>
                                        <th>Data kliknięcia</th>
                                        <th>Data transakcji</th>
                                        <th>Wartość transakcji [PLN]</th>
                                        <th>Prowizja  [PLN]</th>
                                        <th>Status</th>
                                        <th>Akcja</th>
                                     
                                    </tr>
                                </thead>
                                <tbody>

                                </tbody>
                                <tfoot>
                                    <tr>
                                        <th>Lp</th>
                                        <th>Program</th>
                                        <th>Data kliknięcia</th>
                                        <th>Data transakcji</th>
                                        <th>Wartość transakcji [PLN]</th>
                                        <th>Prowizja  [PLN]</th>
                                        <th>Status</th>
                                        <th>Akcja</th>
                                     
                                    </tr>
                                </tfoot>
                            </table>

and my java script

  var table = $('#example').DataTable({
            "ajax": {
                "url": "/AffiliateStatistic/_Orders",
                "data": function (d) {
                    //d.myKey = "myValue";
                    //d.dateTo = $('#max').val();
                    //d.dateFrom = $('#min123').val();
                    // etc
                }
            },
            "serverSide": true,
            "processing": true,
           // "filter": true,
            "dom": 'T<"clear">lfrtip',
            "columnDefs": [
                 {
                     "targets": -1,
                     "data": null,
                     "defaultContent": "<button>Click!</button>",
                     "searchable": false
    
                   
                 },

                
                { targets: [0], data: "Numbers", searchable: false },
                 { targets: [1], data: "ProgramName" },
             
                {
                    targets: [2], data: "ClickDate", type: "date", render: function (data, type, full) { return dtConvFromJSON(data); }
                },
                { targets: [3], data: "AuctionDate", type: "date", render: function (data, type, full) { return dtConvFromJSON(data); } },
                {
                    targets: [4], data: "Amount", type: "num-fmt", render: function (data) { return parseFloat(data).toFixed(2); }
                },
                { targets: [5], data: "AffiliateCommission", type: "num-fmt", render: function (data) { return parseFloat(data).toFixed(2); } },
                { targets: [6], data: "StatusId", "render": function (data, type, full) { return getstatus(data); } },
      { targets: [7], data: "StatusId", "render": function (data, type, full) { return getstatus(data); } },
         
            ],

        });

and JSON result

{
    "draw": 1,
    "recordsTotal": 1000,
    "recordsFiltered": 1000,
    "data": [
        {
            "Numbers": 1,
            "MerchantInvoiceId": 0,
            "AffiliateInvoiceId": 0,
            "StatusId": 2,
            "Amount": 189,
            "Commission": 5.103,
            "Commission2": 15.687,
            "StatusDate": "/Date(1427724122190)/",
            "ClickDate": "/Date(1427723165587)/",
            "AuctionDate": "/Date(1427723231920)/",
            "ClickId": "55196fbde813ca10b47d238c",
            "OrderId": "55196fffe813ca10b47d2390",
            "ProgramName": "sklep",
            "ProgramId": "5b895ee6-4a5e-4987-9520-0b39aa2349bf",
            "VisitorId": "e8e5f669-7a00-4ff7-9d23-88e294c99c2e"
        },

Replies

This discussion has been closed.