How to load dynamic columns and data using sAjaxSource?
How to load dynamic columns and data using sAjaxSource?
nishantsjadhav
Posts: 2Questions: 1Answers: 0
I want to use sAjaxSource to load data and column information. How to create object for aoColumns and aoColumnDefs after sAjaxSource call? My html code only has blank table tag like
. All data will be fill from sAjaxSource.
This discussion has been closed.
Answers
I have used $.getJson() to load columns and data but my datatable object has properties like bServerSide = true; and sAjaxSource = 'url for actionresult which return json object'
and I am calling same method to load data for getJson also. I want to achieve same in both call. due to this implementation during first load of table there are 2 server calls to fetch data and I want solution to stop sAjaxSource call first time. Is there is any way to do that. I have tried to use fnPreDrawCallback() to return false but still not able to stop that.