行数の少ないデータテーブルがあり、テーブルに新しい行を追加したい:
var oTable = $('#StudentsTable').dataTable();
Table2.fnStandingRedraw();
dataTable を初期化するときに、次を追加します。
"bProcessing": true,
"bServerSide": true,
"bDestroy": true,
"fnFilter": true,
'bLengthChange': true,
'bPaginate': true,
'bStandingRedraw': true,
ajax送信後、テーブルを再描画したい:
submitHandler: function(form) {
var $modal = $('#ajax-modal');
$modal.modal('loading');
$(form).ajaxSubmit({
dataType: 'json',
success: function(result) {
if (result.Success) {
if (result.Data.Action == "add") {
var oTable2 = $('#StudentsTable').dataTable();
/*=>here is Call redraw */ oTable2.fnStandingRedraw();
}
ここでエラーが発生します: Uncaught TypeError: Object [object Object] has no method 'fnStandingRedraw'
いくつかの提案?