我有一個動態創建的自定義格式化jqGrid。我需要能夠訪問不在格式化程序中的網格列中的一些信息。我的問題是rowObject似乎只包含來自列的信息,沒有別的,即使JSON數據有一個額外的屬性。jqGrid訪問額外信息
我的JSON的樣子:
{"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"}
]
}
對於每一行,我需要從JSON訪問patient_id。每行的列的數據包含在每行的「單元格」中。 rowObject似乎只包含JSON的每個單元屬性中的信息。如何訪問patient_id而不將其呈現在列中?