is there anyway to pass back additional data in jqgrid treeGrid url request?

牧云@^-^@ 提交于 2019-12-12 17:14:42

问题


i am using jqgrid treeview and i am passing back json response which works great. There is some additional information about the request that i would like to pass back to the GUI and i wanted to see the best way of doing this.

the only way i can think of now is to have another column in the treegrid and shove this data into the json response.

Is there any other way to pass back additional data to display on the client side outside the exact response to populate the tree ??


回答1:


Like in case of standard grid you can fill the userdata part of the JSON data (see here for more information). The value of the userdata can be any object in any format. In the answer I used the data to send information about the row(s) which should be selected after the grid are filled.

Additionally you can extend the standard JSON data with any additional information. The information will be ignored by jqGrid, but you have access to the whole data sent from the server inside of the loadComplete(data) event handler.



来源:https://stackoverflow.com/questions/6669540/is-there-anyway-to-pass-back-additional-data-in-jqgrid-treegrid-url-request

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