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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:43:11+00:00 2026-06-02T00:43:11+00:00

Specifically the simple subgrid, not grid as subgrid. I’ve tried a variety of methods,

  • 0

Specifically the simple subgrid, not “grid as subgrid”.

I’ve tried a variety of methods, but none seem to work.

If I hook into subGridBeforeExpand, the table isn’t ready for me to select the headers and set the css.

If I hook into subGridRowExpanded the subGrid won’t even render.

The align property in the subGridModel only affects the cell value.

Here is my model for reference:

subGrid: true,
subGridUrl: myUrl,                    
subGridModel: [{ 
     name: ["Item", "Qty"],
     width: ["200", "100"],
     align: ["right", "right"],
     param: ["Id"]
}]
  • 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-02T00:43:14+00:00Added an answer on June 2, 2026 at 12:43 am

    You are right, that there are too few callbacks in Subgrids and Treegrids. Nevertheless because I found your question very interesting challenge (+1 from me) I do found a workaround.

    You can do the following:

    var $grid = $("#grid"), sid;
    $grid.jqGrid({
        //... your other settings
        subGrid: true,
        serializeSubGridData: function(p) {
            sid = p.id; // save id from the last request
            return p;
        },
        ajaxSubgridOptions: {
            complete: function (sxml) {
                var ts = $grid[0], $subgridHeaders;
                if (ts.p.subgridtype === "xml") {
                    ts.subGridXml (sxml.responseXML, sid);
                } else {
                    ts.subGridJson($.jgrid.parse(sxml.responseText), sid);
                }
                // now the subgrid is completed and we can modify
                // style of subgrid headers
                $subgridHeaders = $('#' + $.jgrid.jqID(ts.id + '_' + sid))
                    .find("th.ui-th-subgrid");
                // now we can do some custom actions:
                $($subgridHeaders[0]).css("text-align", "left");
                $($subgridHeaders[1]).css("text-align", "right");
            }
        }
    });
    

    You can here the demo which looks like the following after the expanding of subgrids:

    enter image description here

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

Sidebar

Related Questions

trying desperately to combine 2 simple answers into specifically what i need. sql loop
Simple question, but I can't seem to find a good answer within the Android
I'm writing a simple piece of code in ruby, but it's not working the
I'd like to add some simple text into some files. Specifically, I do this
I wrote a simple CMS for one of my clients which does specifically what
I would like to create a simple designer which looks like visual studio. Specifically,
I'm creating a simple mobile website to render specifically on iPhone. I have been
I'm looking for simple but recommended way in Django to store a variable in
The 'e-novative DocBook Environment' is a brain dead simple DocBook toolchain built specifically for
This seems like an incredibly simple issue but I have no idea why I'm

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.