2016-02-12 25 views
0

我想沒有鯛重繪行...我使用https://legacy.datatables.net/ref#fnUpdate像這樣的功能工作;數據表1.9.4編輯一行fnUpdate沒有重繪

oTable.fnUpdate(1, 2, 3, 4, 5); 
  1. {對象|陣列|串}:數據與
  2. {節點| INT}更新單元格/行:要更新TR元件或aoData索引
  3. {INT} :列來更新(設置爲未定義的更新整行)
  4. {BOOL} [默認= TRUE]:重繪表或不
  5. {BOOL} [默認=真]:按照預先繪製的動作或不

實施例:

oTable.fnUpdate('Example update', 0, 0); // Update Single cell (0,0) and redraw 
oTable.fnUpdate('Example update', 0, 0, false); // Update Single cell (0,0) and NOT redraw 
oTable.fnUpdate(['a', 'b', 'c', 'd', 'e'], 1); // Update Row 1 and redraw 

如果我想更新而不重繪???

oTable.fnUpdate(['a', 'b', 'c', 'd', 'e'], 1, ???, false); // Update Row 1 and NOT redraw 

由於

回答

1

我找到它... oTable.fnUpdate([ '一', 'B', 'C', 'd', 'E'],1,未定義,假) ;

-1

變種的rowIndex = $( '#例子')的dataTable()fnGetPosition(element.closest( 「TR」)得到(0))。。 $( '#例子')的dataTable()fnUpdate( '已批准' 和rowIndex,7,假)。;

-1
$('#example').dataTable().fnUpdate('Approved', 2, 5,false);//for 3rd row 6 column 
$('#example').dataTable().fnUpdate('rejected', 2, 6,false);//for 3rd row 7 column 

$('#example').dataTable().fnUpdate(['Approved',rejected'',...], 2, [0,1,...],false);//for 3rd row all columns 
+0

您可以包括在你的答案更多的解釋? – gaRos