title: Why not allowed using success in jquery datatable server side processing ajax?
body: <p>I am using asp.net mvc5 and trying to use jquery datatable plugin server-side processing. The tutorials of server side processing show a format for returning result from server.But the difference in my project is that i cannot send a typed array for 'data' from server. I am sending whole tbody as string with all html tags. My datatable code as below.</p>
  
  <pre><code>  var e = t.DataTable({processing: true, 
          serverSide: true,
          info: true,   
          stateSave: true, 
          PaginationType: "full_numbers",
          ajax:{
              "url": '@Url.Action("AjaxGetJsonData","Define",new { tablename= @HttpContext.Current.Request.QueryString["tablename"] })',
              "type": "GET",
              "success": function (result) {
                  console.log(result);
  
                  $("#sample_1").find("tbody").html(result.data);
                  $("#sample_1_processing").hide();
                  Init();
                  //var oSettings = $("#sample_1").dataTable().fnSettings();
                  //oSettings.iTotalRecords = result.recordsTotal;
  
              }
  
          }
  </code></pre>
  
  <p>The Result of ajax is something like as below,</p>
  
  <pre><code>Object {draw: 1, iTotalRecords: 25000, iTotalDisplayRecords: 0, data: Array[1]}
  </code></pre>
  
  <p>the data is like </p>
  
  <pre><code>&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>because the view is generic for many tables and there are many situation that i should control.Thus, i am using StringBuilder in server side. If i put success to ajax the pagination elements disappear at the bottom of datatable. Why it is not allowed to use success in ajax? i have all total features of datatable and is there any way to set features like iTotalRecords manually ? I know here is not datatable forum. I am sorry about this but i spent time a lot and cannot find solution. I want to handle all features of datatable in ajax success manually.I am using last version of datatable.</p>