Note that there are some explanatory texts on larger screens.

plurals
  1. POjqGrid Access Extra Information
    text
    copied!<p>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.</p> <p>My JSON looks like:</p> <pre><code>{"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"} ] } </code></pre> <p>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?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload