pagination in datatables with row grouping for groups
<p>In datatables after row grouping pagination is applied for the total rows.But i want the pagination for the groups.Can anyone help on this.</p>

<pre><code> $(document).ready(function () {
        $('#example').dataTable({
            "bLengthChange": false,
            "bPaginate": true,
            "bJQueryUI": true
        }).rowGrouping({
            bExpandableGrouping: true,
            bExpandSingleGroup: false,
            iExpandGroupOffset: -1,
            asExpandedGroups: [""]
        });

        GridRowCount();
    });

    function GridRowCount() {
        $('span.rowCount-grid').remove();
        $('input.expandedOrCollapsedGroup').remove();

        $('.dataTables_wrapper').find('[id|=group-id]').each(function () {
            var rowCount = $(this).nextUntil('[id|=group-id]').length;
            $(this).find('td').append($('&lt;span /&gt;', { 'class': 'rowCount-grid' }).append($('&lt;b /&gt;', { 'text': rowCount })));
        });

        $('.dataTables_wrapper').find('.dataTables_filter').append($('&lt;input /&gt;', { 'type': 'button', 'class': 'expandedOrCollapsedGroup collapsed', 'value': 'Expanded All Group' }));

        $('.expandedOrCollapsedGroup').live('click', function () {
            if ($(this).hasClass('collapsed')) {
                $(this).addClass('expanded').removeClass('collapsed').val('Collapse All Group').parents('.dataTables_wrapper').find('.collapsed-group').trigger('click');
            }
            else {
                $(this).addClass('collapsed').removeClass('expanded').val('Expanded All Group').parents('.dataTables_wrapper').find('.expanded-group').trigger('click');
            }
        });
    };
</code></pre>

<p><a href="http://jsfiddle.net/mcsekar/RgKPZ/856/" rel="nofollow">http://jsfiddle.net/mcsekar/RgKPZ/856/</a></p>

<p>In this fiddle the pagination is applied for the rows and not on the group.</p>