Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the data the values of <code>patient_id</code> are always the same as the <code>id</code>. I suppose that there can be different (if <code>patient_id</code> are equal to <code>id</code> you can see the information in the custom formatter already). You can implement what you need in at least three ways:</p> <ol> <li>You add an hidden column (having the property <code>hidden:true</code>) which will represent the <code>patient_id</code>. You move the information about the <code>patient_id</code> in the JSON input inside the <code>"cell"</code> array.</li> <li>You place the information about the mapping between <code>id</code> and <code>patient_id</code> as the part of <code>userdata</code> which you will include in the JSON (see <a href="https://stackoverflow.com/questions/3848815/how-to-read-userdata-in-jqgrid/3849513#3849513">here</a> for more information).</li> <li>You use <code>data</code> parameter of the <code>loadComplete</code> event handle. The <code>data</code> parameter will contain <strong>full</strong> JSON data posted from the server. You can get the information which you need from the <code>data</code> and save it somewhere. Then you get the saved information from the custom formatter.</li> </ol> <p>One more small remark about your JSON data. Currently you use items like</p> <pre><code>{ "cell": [ "637", "Alice", "Test", "01\/01\/1980", "" ], "id": "637", } </code></pre> <p>(if we forget about the <code>patient_id</code>). It means that you send <code>id</code> information twice: one as the part of the column and second time for the first column of the grid. If you would include <code>key:true</code> setting in the definition of the first grid column and add <code>jsonReader: {cell:""}</code> you could make the JSON data in more compact where the row item would be in the array form</p> <pre><code>[ "637", "Alice", "Test", "01\/01\/1980", "" ] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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