我有这个代码..
var _codSelected="";
$("#list").jqGrid({
url: '/modulos/mantenimiento/Proveedores.ashx',
datatype: 'xml',
mtype: 'GET',
colNames: ['Codigo' //Some more colnames and colmodels]
colModel: [{ name: 'Codigo', index: 'PRg_Codigo', edittype: 'select',
editable: true, editrules: { edithidden: false }, editoptions:
{ size: 30, dataUrl: '/modulos/mantenimiento/grupoProveedores.ashx?
oper=selectAllGroups }, sortable: true }
],
onSelectRow: function (rowid) {
_codSelected = rowid;
//alert(_codSelected);
},
当我在 jqgrid 中选择一行时,警报(已注释)向我显示我想通过 dataUrl 发送给我的处理程序的值,但始终为空。警报显示它,但我不能将它包含在 url 中!有人能告诉我我该怎么做吗?
谢谢。
编辑
我已修复添加此事件..
ajaxSelectOptions: {
data: {
codSelected: function () {
return _codSelected;
}
}
}