DataTables warning:table id=datatab - Ajax Error. (tn/7)

DataTables warning:table id=datatab - Ajax Error. (tn/7)

WatcharaWatchara Posts: 30Questions: 5Answers: 1

$('#datatab tfoot th').each(function () {
$(this).html('<input type="text" />');
});

var oTable = $('#datatab').DataTable({
    "serverSide": true,
    "ajax": {
        "type": "POST",
        "url": '/Brand/DataHandler',
        "contentType": 'application/json; charset=utf-8',
        'data': function (data) { return data = JSON.stringify(data); }
    },

------------ Index.cshtml -----------------

<

div class="span12">

<

table id="datatab" class="table table-striped">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.BrandName)
</th>
<th>
@Html.DisplayNameFor(model => model.CreateBy)
</th>
<th>
@Html.DisplayNameFor(model => model.UpdateBy)
</th>
<th>
@Html.DisplayNameFor(model => model.DateCreate)
</th>
<th>
@Html.DisplayNameFor(model => model.DateUpdate)
</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th>
@Html.DisplayNameFor(model => model.BrandName)
</th>
<th>
@Html.DisplayNameFor(model => model.CreateBy)
</th>

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

  • WatcharaWatchara Posts: 30Questions: 5Answers: 1
    Answer ✓

    now this problem been solved by disable proxy entity.

    thanks.

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Thanks for posting back :-)

This discussion has been closed.