Javascript jqGrid-是否可以更改单元格的可搜索内容?
使用Javascript jqGrid-是否可以更改单元格的可搜索内容?,javascript,php,jquery,jqgrid,Javascript,Php,Jquery,Jqgrid,使用jqGrid我得到了一个colModel如下: colModel:[ {name:'id',index:'id', width:50, search: true, sort: true, editable: false}, {name:'number',index:'number', width:150, search: true, sort: true, editable: false}, {name:'product',index:'product', width
jqGrid
我得到了一个colModel
如下:
colModel:[
{name:'id',index:'id', width:50, search: true, sort: true, editable: false},
{name:'number',index:'number', width:150, search: true, sort: true, editable: false},
{name:'product',index:'product', width:300, search: true, sort: true, editable: false},
{name:'pdf_dropdown',index:'pdf_dropdown', width:500, search: true, sort: true, editable: false}
]
{name:'pdf_dropdown',index:'pdf_dropdown', edittype:"select", formatter:"select",
stype: 'select', width:500, search: true, sort: true, editable: false,
searchoptions:{dataUrl:'yourUrl'}}
我的名为“pdf_dropdown”的专栏通过我的一项定制获取内容,该定制将html选择对象
输入其中:
$row['pdf_dropdown'] = '<select name="my_select"><option value="4">Some Text</option>........</select>';
在那里,我可以在我相应的php
文件中,使用$row['pdf\u dropdown\u searchable']
为“pdf\u dropdown\u searchable”提供内容
任何帮助或想法都将不胜感激 有一个名为searchoptions的选项,但仅适用于stype select字段。大概是这样的:
colModel:[
{name:'id',index:'id', width:50, search: true, sort: true, editable: false},
{name:'number',index:'number', width:150, search: true, sort: true, editable: false},
{name:'product',index:'product', width:300, search: true, sort: true, editable: false},
{name:'pdf_dropdown',index:'pdf_dropdown', width:500, search: true, sort: true, editable: false}
]
{name:'pdf_dropdown',index:'pdf_dropdown', edittype:"select", formatter:"select",
stype: 'select', width:500, search: true, sort: true, editable: false,
searchoptions:{dataUrl:'yourUrl'}}
对于所有选项,请参见:
谢谢你的提示。我明天会查出来的。