Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7922469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:57:52+00:00 2026-06-03T16:57:52+00:00

I am using Datatables Collapsible/Expandable Grouping. http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/collapsibleGroups.html I have configured it so that all

  • 0

I am using Datatables Collapsible/Expandable Grouping.
http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/collapsibleGroups.html

I have configured it so that all groups collapsed in the initial view.

I would really like to add the rowcount (number of rows per group) in the group header to make the row grouping more informative. It would let the user how much extra information to expect when clicking to expand the group.

It would also be very useful to add expand/collapse all buttons.

Can anyone help to find away to add these features?

I’ve set up a jsfiddle to show what I’m trying to accomplish:
http://jsfiddle.net/lbriquet/4Rkb3/36/

Any help would be really appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:57:54+00:00Added an answer on June 3, 2026 at 4:57 pm
        $(document).ready(function () {
                    $('#example').dataTable({
                        "bLengthChange": false,
                        "bPaginate": false,
                        "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($('<span />', { 'class': 'rowCount-grid' }).append($('<b />', { 'text': rowCount })));
                    });
    
                    $('.dataTables_wrapper').find('.dataTables_filter').append($('<input />', { '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');
                        }
                    });
                };
    
    
    // ------------ Css -------------------------//
           .rowCount-grid
            {
                float: right;
                font-size: 15px;
                color: Red;
                padding-right: 250px;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Datatables and have this jquery plugin showing in a few columns http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
I have been using the DataTables plugin for jQuery (http://www.datatables.net) to search, sort and
I have started using the DataTables plugin (v1.6.2) for jQuery (v1.4.2), and I would
I'm using jQuery datatables plug-in on my HTML Table. I wanted to know how
I am using datatables. ( http://datatables.net/ ) I have created a table. There is
I am using jquery datatables for html table generation. I setup a callback to
I have DataGridView and I set DataSource of datagridview by using DataTables. DataTable dt
I'm using http://datatables.net/examples/ for easy control table. I'm generating table with more than 30,000
I have a datefilter for datatables using a calendar image and it works great.
I am using the jQuery DataTables plugin. I would like to move the search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.