I'm playing around with jqGrid and am wondering if the value of jsonmap in the colModel of jqGrid can have filtered value.
ColModel
colModel:[
{name:'fname',index:'action',jsonmap:'cells.cell.colname["fname"].value', width:50, align:"center", resizable:false}
]
JSON
{
"rows":[
{
"cells":
{
"cell":{
"value":"Mark",
"colname": "fname"
}
}
}
]
}
The value of "cells" property in the JSON input as an array
{
"rows":[
{
"cells":[
{
"cell":{
"value":"Mark",
"colname": "fname"
}
}]
}
]
}
with the following colModel
does not work
colModel:[
{name:'fname',index:'action',jsonmap:'cells.cell.value', width:50, align:"center", resizable:false}
]
To place more than one column and why the suggestion of adding a filter - I have a problem mapping json with jsonmap
with the following structure. That is why I asked if we could add a filter.
{
"rows":[
{
"cells":
{
"cell":{
"value":"Mark",
"colname": "fname"
},
"cell":{
"value":"Strong",
"colname": "lname"
},
"cell":{
"value":"Hourly",
"colname": "emptype"
}
}
}
]
}
UPDATED: The JSON data can be
{
"wrapper": {
"rows": [
{
"cells": [
{
"value": "Mark",
"colname": "fname"
},
{
"value": "Strong",
"colname": "lname"
},
{
"value": "Hourly",
"colname": "emptype"
}
]
},
{
"cells": [
{
"value": "Mark2",
"colname": "fname"
},
{
"value": "Strong2",
"colname": "lname"
},
{
"value": "Hourly2",
"colname": "emptype"
}
]
}
]
}
}