table Rows not added on ajax call

table Rows not added on ajax call

KarthikTvKarthikTv Posts: 2Questions: 1Answers: 1
edited February 2016 in Free community support

HTML Code:

<table id="table" class="table table-striped table-bordered table-hover">
      <thead>
           <tr>
                   <th>ModemName</th>
                   <th>AssignedTo</th>
                  <th>AssignDate</th>
                   <th>ReturnedDate</th>
                   <th>CreatedName</th> 
            </tr>
     </thead> 
</table> 

JS Code:

$(document).ready( function () {
  var oTable = $('#gvAssgin').dataTable
               ({
                   "bProcessing": true,
                   "bServerSide": true,
                   "sAjaxSource": "AssignHistory.aspx/getAllModemAssign",
                   "fnServerData": function(sSource, aoData, fnCallback) {
                       $.ajax({
                           type: "POST",
                           url: "AssignHistory.aspx/getAllModemAssign",
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           data: "{}",
                           success: function (json) { 
                           },
                           error: function (xhr, textStatus, errorThrown) {
                               alert(xhr.responseText);
                           }
                       });
                   },
                   "columns": [
                       { "data": "ModemName" },
                       { "data": "AssignedTo" },
                       { "data": "AssignDate" },
                       { "data": "ReturnedDate" },
                       { "data": "CreatedName" } 
                   ]
               });
} );

In result i can see the values in browser debugging but, values are not adding to the table

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.