RowGroup Not Working
RowGroup Not Working

I have a rowGroup which is defined as such;
rowGroup: {
//className: 'vendor_details',
emptyDataGroup: null,
dataSrc: 'ps2.segment_title',
// startRender: function ( rows, group ) {
//
// return group +' ('+rows.count()+' rows)';
// }
},
I have a column definition in my datatable (same one that im attempting to do rowGroup on) which is as such;
{"data":"ps2.segment_title"}
The segment_title is displaying correctly in the table however, the rowGroup does not work for this value. If I change it to another value in my dataset, it works fine. The value that it does work for is derived from the main table whereas ps2 is derived from a leftJoin. Not sure if this is the reason why it suddenly doesnt work. Any help would be much appreciated.
This question has an accepted answers - jump to answer
Answers
This is the javascript error i get;
Sounds like a lot of stuff going on there. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Thanks Colin. Here it is;
http://live.datatables.net/nolehowe/1/edit?html,css,js,output
Getting JS errors when loading RowGroup. Seems odd given im not doing anything unusual. Let me know what ive done wrong.
You are getting these two errors due to your JS load order. Datatabables needs to be loaded first.
Not sure this is valid syntax for rowGroup:
I changed it to this:
It seems to work:
http://live.datatables.net/duviyire/1/edit
Kevin
Thanks Kevin. I that to start with but found some code somebody else published which used that method so I thought I give it a try.
I assumed the order of the libraries loaded but i tried changing them around and it didnt seem to make any difference. To be honest, Its the first time ive used JSBin so not too familiar with it.
So the fact that it is giving me similar behaviour in my app may be related. Ill have a look and see if this is the case. Thanks for your help.
Ok. Looks like that is definitely the issue. Ive managed to get it working. Now to get it working in my app. Thanks for the help.
Looks like you can use a function for
rowGroup.dataSrc
, see the comments section. But in your case you were return therowgroup
option as a function which I don't think is supported.Kevin