Passing table id to controller

Passing table id to controller

skykharkovskykharkov Posts: 1Questions: 1Answers: 0
edited February 2018 in Free community support

Hi. I have multiple very simple tables. Lets says with ids "table1", "table2", "table3" and with class="display". I init this tables in single script:

            $('table.display').DataTable({
                "processing": true,
                "serverSide": true,
                "ajax": {
                    "type": "POST",
                    "url": "/api/SalesPerDays",
                    "data": function (d) {
                        d.StartDate = $('#startDate').val();
                        d.EndDate = $('#endDate').val();
                    }
                },
                "columns": [
                    { "data": "one" },
                    { "data": "two" },
                    { "data": "three" }
                ]
            });
            });

In what way I can pass table id to controller?
Thank you!

This discussion has been closed.