Open GoogleCodeExporter opened 9 years ago
I had the same requirement that I need to collapse all 2-level grouped table.
What I have is add click method in '_fnOnGrouped()':
function _fnOnGrouped() {
$('.group, .subgroup').click();
}
This is dumb solution, but it seems to work for me.
Original comment by khs...@gmail.com
on 15 Nov 2012 at 7:26
[deleted comment]
I've got the same requirements too, and i'm facing the same trouble. Plus, the
'dumb solution' proposed by khs...@gmail.com doesn't work for me.
Also, it would be nice if expanding the first level grouping the second one was
showed collapsed. As in the live example by yasir.su...@gmail.com, this is
never the case, at the moment.
Original comment by roberto....@horosweb.com
on 5 Mar 2013 at 11:56
Same issue. I want all the rows collapsed during the initial load!alas not
working
Original comment by ta.sethu...@gmail.com
on 16 Mar 2013 at 5:41
I've managed to modify the plugin to achieve the described behaviour. In the
attachment, my modified version of it. Everything is commented as "//Roberto
A****** - Two-level grouping optimization"
Let me know if this fix is going to be merged in the forecoming versions of
jquery.datatables.grouping.js
Original comment by roberto....@horosweb.com
on 19 Mar 2013 at 11:35
Attachments:
I found an issue with the fix that Roberto did (which works awesome, thanks!)
The problem is after you collapse the second group once, it won't expand. To
fix this, I uncommented the code shown below:
//Roberto A****** - Two-level grouping optimization
aoGroups[sGroup].state = "collapsed"; //(standard code - uncommented now to fix issue)
for(var i in aoGroups) {
if (aoGroups[i].key.match(sGroup) != null)
aoGroups[i].state = "collapsed";
}
//Roberto A****** - End of Two level grouping optimization
I'm not sure if this will cause any other issues, but so far it seems to be
working.
Original comment by sva...@gmail.com
on 18 Sep 2013 at 2:34
Original issue reported on code.google.com by
yasir.su...@gmail.com
on 7 Nov 2012 at 12:24