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 8959139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:22:41+00:00 2026-06-15T15:22:41+00:00

I have a JQGrid that groups together certain rows. I use group to define

  • 0

I have a JQGrid that groups together certain rows. I use group to define what rows should grouped together, so for example, if there are three 2s, it groups all 2s together. However it’s possible there could be only one 2, in which case I wouldn’t want it grouped, i.e. having the row under a group.

My question is, is it possible to have the grouping only be applied to certain rows and leave others alone?

Below is what I currently have:

colNames:['group', 'Description', 'File Sent to Customer', 'Date/Time', 'ATS', '# of Bib Records', '# of Items', 'Customer DB', 'Customer ID'],
    colModel:[
        {name:'group', index:'group'},
        {name:'description', index:'description'},
        {name:'fileSent', index:'fileSent', width:150},
        {name:'date', index:'date', width:160},
        {name:'ats', index:'ats', width:100},
        {name:'bibRecords', index:'bibRecords', width:100},
        {name:'items', index:'items', width:100},
        {name:'customerDB', index:'customerDB', width:240},
        {name:'customerID', index:'customerID', width:150}
    ],
    grouping:true,
    groupingView : {
        groupField : ['group'],
        groupColumnShow : [false],
        groupText : [''],
        groupCollapse : true,
        groupOrder: ['desc']
    },
  • 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-15T15:22:43+00:00Added an answer on June 15, 2026 at 3:22 pm

    I find your question interesting. So I wrote the solution which shows instead of the standard grouping (see the starting demo)

    enter image description here

    the following:

    enter image description here

    The corresponding code is not so complex:

    loadComplete: function () {
        var i, groups = $(this).jqGrid("getGridParam", "groupingView").groups,
            l = groups.length,
            idSelectorPrefix = "#" + this.id + "ghead_0_";
        for (i = 0; i < l; i++) {
            if (groups[i].cnt === 1) {
                // hide the grouping row
                $(idSelectorPrefix + i).hide();
            }
        }
    }
    

    It uses one level grouping, but it can be changed in the same way to the multilevel grouping.

    One warning about the resulting grid: you should be careful with sorting of the grid. The problem is that jqGrid sort the rows inside of the group only. So the above rows with hidden grouping headers seems be out of sorting process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data from JQGrid that should be exported to excel. So, we
I have customized jqGrid's edit form to have some fields that use jQuery's DatePicker
I have a jqGrid with only certain columns that are editable and I would
I have a JQGrid that has a date column. I use the date formatter
I have a load once jqgrid that uses a custom formatter to display checkboxes
I have a jqGrid in grouping mode that works fine on initial load. However,
I have a jqgrid with the add dialog enabled for adding new rows. The
I've noticed that multi grouping in JQGrid elicits rows sorting to be rearranged inline
I have a jqGrid that has add/edit dialogs with a form that's longer than
I have a jqGrid that's working 100% except that it keeps displaying undefined in

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.