我有一个几行的数据表,我想在表中添加新行:
var oTable = $('#StudentsTable').dataTable();
Table2.fnStandingRedraw();
当我初始化数据表时,我添加:
"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();
}
在这里它给了我错误: 未捕获的类型错误:对象[对象对象]没有方法'fnStandingRedraw'
一些建议?