jqGrid toolbar filtering with a custom formatter

淺唱寂寞╮ 提交于 2019-12-11 18:17:44

问题


I've looked at the documentation for toolbar filtering, and in a couple of places I've needed to use a custom formatter in order to display images inside a cell.

With a custom formatter in place I don't get a toolbar filter is there anything I can do about this.


回答1:


You can define the stype:'select' and the searchoptions with the value or dataUrl for the column where you use the custom formatter:

stype:'select', searchoptions:{value:'...'}

then in the searching (including the searching toolbar) you will have dropdown list. So you can use your custom formatter to display the values in the cells and use standard select formatter in the searching toolbar.

See the demo:



来源:https://stackoverflow.com/questions/6154245/jqgrid-toolbar-filtering-with-a-custom-formatter

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