Jqgrid not displaying single row

强颜欢笑 提交于 2019-12-25 05:23:15

问题


The below given string is not getting displayed on my jqgrid

    {"assignfix":{"sno":"1","fix":"Se2","templateName":"Restroom","profile":{"id":"11","name":"Restroom"}}}

But when I insert this

 {"assignfix":[{"sno":"1","fix":"Sef2","templateName":"Restroom","profile":{"id":"11","name":"Restroom"}}]}

It gets displayed properly , it is the problem with single row only.


回答1:


You don't posted the definition of jqGrid which you use where the jsonReader or xmlReader are important to know. In general I think you answered yourself indirectly on your question. If the value of assignfix property should be array you should post the data as an array event if the array has one element or if it has no elements. It should be still array.



来源:https://stackoverflow.com/questions/12702106/jqgrid-not-displaying-single-row

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!