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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:46:03+00:00 2026-05-22T01:46:03+00:00

I have a dynamically created jqGrid with a custom formatter. I need to be

  • 0

I have a dynamically created jqGrid with a custom formatter. I need to be able to access some information that is not in a grid column within the formatter. My problem is that the rowObject seems to contain only the information from the columns and nothing else, even though the JSON data has an extra attribute.

My JSON looks like:

{"rows":
  [
    {"cell":["637","Alice","Test","01\/01\/1980",""],"id":"637","patient_id":"637"},
    ...
    {"cell":["635","Alice","Test","01\/01\/1980",""],"id":"635","patient_id":"635"},
  ],
  "form_id":"3",
  "records":"35",
  "total":2,
  "goto_patient_sidebar":"1",
  "totalRecords":"35",
  "dynamicFilters":"",
  "listName":"Patients",
  "page":1,
  "recordsReturned":25,
  "columns":
  [
    {"id":"75","field_id":"2","zmr_list_id":"13","alias":"Last Name",
    "sortorder":"0","reference_field_id":"90","show_date":"0","show_time":"0"},

    {"id":"76","field_id":"1","zmr_list_id":"13","alias":"First Name",
    "sortorder":"1","reference_field_id":"90","show_date":"0","show_time":"0"},

    {"id":"77","field_id":"25","zmr_list_id":"13","alias":"DOB",
    "sortorder":"2","reference_field_id":"90","show_date":"1","show_time":"0"},

    {"id":"78","field_id":"47","zmr_list_id":"13","alias":"Phone Number",
    "sortorder":"3","reference_field_id":"90","show_date":"0","show_time":"0"}
  ]

}

For each row, I need to access the patient_id from the JSON. The data for the columns of each row is contained in the ‘cell’ for each row. The rowObject seems to contain only the information in each cell attribute of the JSON. How can I access patient_id without it being rendered in the column?

  • 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-22T01:46:04+00:00Added an answer on May 22, 2026 at 1:46 am

    In the data the values of patient_id are always the same as the id. I suppose that there can be different (if patient_id are equal to id you can see the information in the custom formatter already). You can implement what you need in at least three ways:

    1. You add an hidden column (having the property hidden:true) which will represent the patient_id. You move the information about the patient_id in the JSON input inside the "cell" array.
    2. You place the information about the mapping between id and patient_id as the part of userdata which you will include in the JSON (see here for more information).
    3. You use data parameter of the loadComplete event handle. The data parameter will contain full JSON data posted from the server. You can get the information which you need from the data and save it somewhere. Then you get the saved information from the custom formatter.

    One more small remark about your JSON data. Currently you use items like

    {
        "cell": [
            "637",
            "Alice",
            "Test",
            "01\/01\/1980",
            ""
        ],
        "id": "637",
    }
    

    (if we forget about the patient_id). It means that you send id information twice: one as the part of the column and second time for the first column of the grid. If you would include key:true setting in the definition of the first grid column and add jsonReader: {cell:""} you could make the JSON data in more compact where the row item would be in the array form

    [
        "637",
        "Alice",
        "Test",
        "01\/01\/1980",
        ""
    ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some dynamically created inputs which are not server-side controls. I want to
I have a dynamically created image that I am saving to a stream so
I have a dynamically created table, that has N rows and M QTableWidgetItems (that
I have a little problem. I have some dynamically created tables and each row
I have a table of paged data, along with a dynamically created pager (server-side
I have a link that I dynamically create which looks something like the following:
I have written a CGI script that creates an image dynamically using GET data.
I have dynamically created a xml string form a JSON object returned from server.
I have dynamically created DataGridView control on form, with DataSource specified as: ((DataGridView)createdControl).DataSource =
I have a dynamically created drop down and if the option "Other" is 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.