Deleting Multiple Rows

Deleting Multiple Rows

Raj31Raj31 Posts: 2Questions: 0Answers: 0
edited January 2014 in General
I have a datatable from which I am searching few records and adding into another datatable, now I want to delete all these records from my first datatable, how to to this.

Since there can be thousand of rows in my search criteria I am using the below method to add all the searched result into my another datatable ( below is the code)

var data = oTable._('tr', {"filter":"applied"});
selectedRecords.fnAddData(data);

Can somebody help in deleting all the rows which I got in data.

Thanks.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Use fnDeleteRow - with the 'redraw' parameter set to false, so it doesn't redraw the table on every delete! Then when you are finished deleting rows, call fnDraw to redraw.

    Allan
  • Raj31Raj31 Posts: 2Questions: 0Answers: 0
    edited January 2014
    Thank you Allan, as I had said I am using var data = oTable._('tr', {"filter":"applied"}); to get my data, I am not selecting any row, the data which I get is of search filter. What parameter should I pass in fnDeleteRow function with the data which I get from my above code
This discussion has been closed.