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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:49:19+00:00 2026-05-31T23:49:19+00:00

I seem to have an issue where with jQuery Grid (jqGrid) if I have

  • 0

I seem to have an issue where with jQuery Grid (jqGrid) if I have loaded data where one of the cells has a table inside, it throws an error when onSelectRow() is fired and I call $(grid).getRowData(rowid).

jqGrid seems to be enumerating ALL of the TD elements in the selected row (including those which are children of the table within a given cell).

Is there a proper way to do this or to prevent jqGrid from enumerating those elements? 🙁

EDIT: In my particular case, the HTML was hidden until needed, so I was able to replace the TD’s with “xtd” on the server until sent out to the client. On the client-side, when I needed them HTML, I just replace “xtd” to “td”. Still wish there was a better way.

EDIT: I want to clarify, I desire a method of doing this that doesn’t modify the plugin. An well-written modification would still be nice.

  • 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-31T23:49:20+00:00Added an answer on May 31, 2026 at 11:49 pm

    Old but yet not solved.

    Hi. Yes jqGrid has problem with inner table and td but there is a quick and useful fix. In file jquery.jqGrid.min (jqGrid 3.8.2 – jQuery Grid). Put file into js-beutifier or get not minified version and find getRowData function. Then you have to add extra condition to lookup foreach b("td", r).each(function (t) { to code b("td[id!='-1']", r).each(function (t) {. In your inner table you should declare <td id="-1">. In this case you exclude your td from searching in colModel.

    Copy/Paste this code:

    getRowData: function (f) {
                var j = {},
                    i, c = false,
                    e, k = 0;
                this.each(function () {
                    var n = this,
                        a, r;
                    if (typeof f == "undefined") {
                        c = true;
                        i = [];
                        e = n.rows.length
                    } else {
                        r = n.rows.namedItem(f);
                        if (!r) return j;
                        e = 2
                    }
                    for (; k < e;) {
                        if (c) r = n.rows[k];
                        if (b(r).hasClass("jqgrow")) {
                            b("td[id!='-1']", r).each(function (t) {//fix
                                a = n.p.colModel[t].name;
                                if (a !== "cb" && a !== "subgrid" && a !== "rn") if (n.p.treeGrid === true && a == n.p.ExpandColumn) j[a] = b.jgrid.htmlDecode(b("span:first", this).html());
                                else try {
                                    j[a] = b.unformat(this, {
                                        rowId: r.id,
                                        colModel: n.p.colModel[t]
                                    }, t)
                                } catch (B) {
                                    j[a] = b.jgrid.htmlDecode(b(this).html())
                                }
                            });
                            if (c) {
                                i.push(j);
                                j = {}
                            }
                        }
                        k++
                    }
                });
                return i ? i : j
            }
    

    Finally where you want to put inner table do this:

    <table>
        <tr>
            <td id="-1">
                Now It's working!
            </tr>
            <td id="-1">
                Yeah
            </tr>
        </tr>
    </table>
    

    Of course you can change id attribute but I recommend fix this with html id attribute due to jQuery performance against class attribute.

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

Sidebar

Related Questions

I seem to have an issue with using jQuery to do a PostBack. I
I seem to be having an issue with JQUERY. I have an onclick event
I seem to be having a strange jQuery issue. On my page I have
I seem to have an issue with connecting to an embedded FireBird database from
I have a slight issue where I can't seem to select a User Control
I have this chronic issue with iPhone UI development where views sometimes seem to
I seem to have an app on my Dev server that has lots of
I have been struggling with what I feel is a simple JQuery selector issue,
I am trying to use the JQGrid plugin and have run into an issue
I am have an issue returning a partial view in a jquery dialog. The

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.