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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:09:14+00:00 2026-05-21T14:09:14+00:00

Hi all this is my jqgrid that has subgrid enabled….. jQuery(#issuegrid).jqGrid({ url: ‘griddata.aspx/IssueData?id=2’, datatype:

  • 0

Hi all this is my jqgrid that has subgrid enabled…..

jQuery("#issuegrid").jqGrid({
                    url: 'griddata.aspx/IssueData?id=2',
                    datatype: 'json',
                    mtype: 'POST',
                    colNames: ['Edit', 'IssueDetailsID', 'IssueCode', 'Title', 'Type', 'Project', 'Status', 'Priority', 'EstTime', 'EstimatedTime', 'EstimatedTimeFormat', 'AssignTo', 'AssignBy', 'AssignDate', 'ModifiedBy', 'ModifiedDate'],
                    colModel: [
                        { name: 'Edit', index: 'Edit', width: 20, sortable: false, align: 'center' },
                        { name: 'IssueDetailsID', index: 'Issue_Details_ID', width: 15, hidden: true },
                        { name: 'IssueCode', index: 'ProjectCode', width: 45 },
                        { name: 'Title', index: 'IssueTitle', width: 75 },
                        { name: 'Type', index: 'IssueName', width: 70 },
                        { name: 'Project', index: 'ProjectName', width: 100, align: 'center' },
                        { name: 'Status', index: 'IssueStatus', width: 30, align: 'center' },
                        { name: 'Priority', index: 'IssuePriority', width: 30, align: 'center' },
                        { name: 'EstTime', index: 'EstTime', width: 40, align: 'center', sortable: false },
                        { name: 'EstimatedTime', index: 'EstimatedTime', width: 40, align: 'center', hidden: true },
                        { name: 'EstimatedTimeFormat', index: 'EstimatedTimeFormat', width: 40, align: 'center', hidden: true },
                        { name: 'AssignTo', index: 'UserName', width: 80, align: 'left' },
                        { name: 'AssignBy', index: 'UserName', width: 80, align: 'left' },
                        { name: 'AssignDate', index: 'AssignedDate', width: 80, align: 'left' },
                        { name: 'ModifiedBy', index: 'UserName', width: 50, align: 'left' },
                        { name: 'ModifiedDate', index: 'ModifiedDate', width: 50, align: 'left', sortable: false}],


                    pager: '#pager1',
                    rowList: [10, 20, 30],
                    sortname: 'IssueTitle',
                    rowNum: 10,
                    sortorder: "desc",
                    loadtext: "Loading....",
                    shrinkToFit: true,
                    emptyrecords: "No records to view",
                    width: x - 20,
                    height: 250,
                    rownumbers: true,
                    multiselect: false,
                    subGrid: true,
                    subGridRowExpanded: function(subgrid_id, IssueDetailsID) {
                        var subgrid_table_id, pager_id;
                        subgrid_table_id = subgrid_id + "_t";
                        pager_id = "p_" + subgrid_table_id;
                        $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + pager_id + "' class='scroll'></div>");
                        jQuery("#" + subgrid_table_id).jqGrid({
                            url: 'griddata.aspx/IssueData_Child?id=4&IssueId=' + IssueDetailsID,
                            datatype: 'json',
                            height: 50,
                            type: 'POST',
                            width: 920,
                            contentType: 'application/json; charset=utf-8',
                            colNames: ['Issue_Details_ID', 'IssueCode', 'IssueTitle', 'Comments'],
                            colModel: [
                             { name: 'Issue_Details_ID_Key', index: 'Issue_Details_ID_Key', hidden: true, width: 60 },
                             { name: 'IssueCode', index: 'IssueCode', width: 60 },
                             { name: 'IssueTitle', index: 'IssueTitle', width: 60 },
                             { name: 'Comments', index: 'Comments', width: 190 }

                             ],
                            multiselect: false,
                            caption: "View Comments",
                            rowNum: 10,
                            pager: '#ChildPager',
                            rowList: [10, 15, 20, 30, 50, 100],
                            sortname: 'Issue_Details_ID_Key',
                            sortorder: "desc",
                            loadtext: "Loading....",
                            shrinkToFit: true,
                            emptyrecords: "No records to view",
                            rownumbers: true,
                            viewrecords: true
                   });
                        jQuery("#ChildGrid").jqGrid('navGrid', '#ChildPager', { edit: false, add: false, del: false });


                    },
                    subGridRowColapsed: function(subgrid_id, IssueDetailsID) {
                        // this function is called before removing the data
                        var subgrid_table_id;
                        subgrid_table_id = subgrid_id + "_t";
                        jQuery("#" + subgrid_table_id).remove();
                    }



                });

                jQuery("#issuegrid").jqGrid('navGrid', '#pager1', { edit: false, add: false, del: false });
            });

this wil enable a subgrid to open for the particular row and show the details onclicking the plus button….my problem is i have to change the color of that particular cell(row) that has subgrid opened

Thanx in advance

  • 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-05-21T14:09:15+00:00Added an answer on May 21, 2026 at 2:09 pm

    The setting the background color of the cell in the subgrid work exactly in the same way as for the grid. Look at the following old answers which shows different ways how one can change the the background color: this, this and if you use jqGrid 4.0 then this also.

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

Sidebar

Related Questions

first of all: this is not the same as this . The ModelBackend has
I am using a jqGrid that has allot of columns to it. I added
The jqGrid has been kicking my butt (as well as others on this site).
This is a question that I know has been asked here and several other
We have a jqGrid that shows the search box above the grid at all
I have a code for jqGrid with custom editFunc that opens my own jQuery-UI
I have the following jqgrid that uses the jquery ui theme imported to my
I have a JQGrid with loadonce:true(so it's all client side) and paging enabled(with, say
Hello I have an example that works properly: $(function() { $(#treegrid).jqGrid({ url: 'tree2.json', datatype:
All this originated from me poking at a compiler warning message (C4267) when attempting

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.