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

  • Home
  • SEARCH
  • 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 8764797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:07:19+00:00 2026-06-13T16:07:19+00:00

I have two jqGrids. In the first grid I select a row and the

  • 0

I have two jqGrids. In the first grid I select a row and the second grid refreshes with data based on the id of the first grid. At least that is how it is supposed to work.

//This is code from the second grid
postData: '{ lobId: ' + BudgetCore.getLobId() + ' }',

//Snippet from BudgetCore...
getLobId: function () {
    var row = jQuery(BudgetCore.GridTables.Lob).jqGrid('getGridParam', 'selrow');
    return row;
}

In Chrome I try to debug the function, getLobid() but it is never executed. The postData request sent: { lobId:null }.

If I change the code above to ‘{ lobId: ‘ + 1 + ‘ }’ it works, so there must be something wrong that is causing this function not to execute. In the Chrome JS console executing BudgetCore.getLobId() works fine.

  • 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-13T16:07:20+00:00Added an answer on June 13, 2026 at 4:07 pm

    You should use

    postData: {
        lobId: function () {
            return $(BudgetCore.GridTables.Lob).jqGrid('getGridParam', 'selrow');
        }
    }
    

    See the answer for more details.

    UPDATED: If you need to use JSON.stringify additionally inside of serializeGridData then you can’t use more the simplest version of serializeGridData:

    serializeGridData: function (postData) { return return JSON.stringify(postData); }
    

    Instead of that you should use a little more complex version of serializeGridData which I described in the answer:

    serializeGridData: function (postData) {
        var propertyName, propertyValue, dataToSend = {};
        for (propertyName in postData) {
            if (postData.hasOwnProperty(propertyName)) {
                propertyValue = postData[propertyName];
                if ($.isFunction(propertyValue)) {
                    dataToSend[propertyName] = propertyValue(); // call the function
                } else {
                    dataToSend[propertyName] = propertyValue;
                }
            }
        }
        return JSON.stringify(dataToSend);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two different jqGrids in the same page. In the first grid I've
I have a page that has two jqGrids on it. One contains a list
I have two queries that find both the Zip codes, and the States for
Have two tables say ABC and XYZ and contain one column which data will
I have an HTML form containing some textboxes and two jqGrids. The user selects
I have a JQGrid that has an 'Add' button. In my grid, when the
Have two sets of data (two tables) for patient records, one 1999-2003, the other
Have two issues one is showFromToolbar statement format warning issue and another is that
I have two tables that have the same structure, I need a query to
I have two applications written in Java that communicate with each other using XML

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.