sodri126 / jquery-datatables-row-grouping

Automatically exported from code.google.com/p/jquery-datatables-row-grouping
0 stars 0 forks source link

RowGrouping does not destroy the rows on fnDestroy() #76

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When I call the fndestroy on the dataTable the table is destroy leaving the 
rows created by the row-grouping

What is the expected output? What do you see instead?
I want  the rows created by the row-grouping delted after calling the 
fndestroy. If not possible. How can I delete the rows before fndestroy

Here is the [jsfiddle](http://jsfiddle.net/Bl_praveen2004/sJw6r/2/)
I trying to manually delete the rows

  var ogroups = oTable.dataTableExt.aoGroups;

    if(oTable != null) oTable.fnDestroy();
    $.each(ogroups,function(i,group) {
        group.nGroup.remove()
    });  

it is not working

Original issue reported on code.google.com by blpravee...@gmail.com on 10 Apr 2014 at 9:09

GoogleCodeExporter commented 9 years ago
I am able to solve myself here is the updated link
http://jsfiddle.net/Bl_praveen2004/sJw6r/6/
    var ogroups = oTable.dataTableExt.aoGroups;
    var rows = oTable.fnGetNodes();   
    if(oTable != null) oTable.fnDestroy();
    for(var group in ogroups) {
        ogroups[group].nGroup.remove()
    };
    for(var i=0;i<rows.length;i++)
    {
        $(rows[i]).css('display','table-row');
    }

Original comment by blpravee...@gmail.com on 12 Apr 2014 at 1:49