Rowgroup collapse can't seem to get it to work

Rowgroup collapse can't seem to get it to work

trishdevtrishdev Posts: 13Questions: 1Answers: 0

http://live.datatables.net/xowuzewu/1/edit

I created a test case and I followed some of the examples I found but for my specific table I cannot seem to get it to collapse at all. Any help will be much appreciated.

thanks

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    There are a couple issues:

    1. If you right click on a rowGroup row and inspect the row you will see that the HTML5 data attribute you want to use is name not department.

    2. You are initializing all the groups with a setting of true which indicates to that group is collapsed. So when clicking on a group it will not collapse but all the others will.

    See the updated example with these fixes:
    http://live.datatables.net/zatanaju/1/edit

    Kevin

  • trishdevtrishdev Posts: 13Questions: 1Answers: 0

    Thanks so much.. I did figure that one out.. I used

    var department = $(this).attr('data-name');
    
Sign In or Register to comment.