Advertisement
KuldeepKbj

Add a callback to RemoveRow plugin to Handsontable

Oct 4th, 2012
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. First Added the following line into plugin removeRow
  2.     if(typeof labels.onRemove ==  'function')
  3.     {
  4.         labels.onRemove.call(undefined, $(this).parents('tr').index());
  5.     }
  6.  
  7. Then added a callback function at removeRow call at Handsontable like that.
  8.     RemoveRow : {
  9.         'remove' : remove_row,
  10.         'onRemove' : function(row_index) {
  11.             console.log('Row Index = ' + row_index);
  12.             if(row_index > 1 )
  13.             {
  14.                  // My Call back code
  15.             }
  16.         }
  17.     }    
  18. instead of using RemoveRow : true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement