I am playing with jqGrid and wondering if the jsonmap value in colModel jqGrid can have a 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 the "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 accommodate more than one column and why it is suggested to add a filter , I have a problem displaying json with jsonmap with the following structure. That's 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 . JSON data may 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" } ] } ] } }