RowGroup and orthogonal data

RowGroup and orthogonal data

JesterAntikJesterAntik Posts: 12Questions: 3Answers: 0

Use DOM-source. Rowgrouping work well until add data-* attribute Example

I'm assuming that the problem in this part of the source code

rows.every( function () {
            var d = this.data();
            var group = that.s.dataFn( d );

            if ( last === undefined || group !== last ) {
                groupedRows.push( [] );
                last = group;
            }
            
            groupedRows[ groupedRows.length - 1 ].push( this.index() );
        } );

In this case variable group is object (is it?) and comparison dont work.
I try fix it and use some callbacks( columns.data / columns.render / rowGroup(function(){....}) ), but dont understand how to do it correctly.

Replies

  • allanallan Posts: 63,893Questions: 1Answers: 10,530 Site admin

    Good point - thanks for pointing this out.

    I don't think there is a quick and easy fix for this I'm afraid. Let me have a think about it and I'll get back to you when I've got something.

    Allan

  • JesterAntikJesterAntik Posts: 12Questions: 3Answers: 0

    What's about use something like:

    that.s.dataFn( d , 'sort' );

    Or even make new type 'group'.

  • allanallan Posts: 63,893Questions: 1Answers: 10,530 Site admin

    Thanks for the suggestion. Yes, there is a good chance that I might do something like that.

    Allan

  • JesterAntikJesterAntik Posts: 12Questions: 3Answers: 0

    For now use callback: live.datatables.net/fefetinu/11/edit
    Maybe it'll be usefull.

This discussion has been closed.