$("#list").jqGrid({
url: '/modulos/carga/cargaServiciosTarifa.ashx',
datatype: 'xml',
mtype: 'GET',
colNames: ['Precio Dia', 'Precio Hora','Unidad'],
colModel: [
{ name: 'preciodia', index: 'preciodia', width: 100, align: 'center', editable: true, sortable: false },
{ name: 'preciohora', index: 'preciohora', width: 400, align: 'center', editable: true, sortable: false },
{ name: 'Unidad', index: 'TSI_Unidad', width: 100, align: 'center', editable: true, edittype: 'select',
editoptions: { value: "Dia:Dia;Hora:Hora" }, sortable: true }
],
autoencode: true,
pager: '#pager',
rowNum: 20,
sortname: 'preciohora',
sortorder: 'asc',
sortable: true,
autowidth: false,
width: 733,
height: -1,
shrinkToFit: true,
viewrecords: true,
gridview: true,
caption: 'Listado Servicios asociados a Tarifa',
postData: {tarId: tarId.val()},
editurl: '/modulos/carga/cargaServiciosTarifa.ashx'
});
//Paginador
jQuery("#list").jqGrid('navGrid',
'#pager',
{
alerttext: "Seleccione un precio.",
add: true, addtitle: "Crear precio",
del: true, deltitle: "Eliminar precio",
edit: true, edittitle: "Modificar precio",
search: false, searchtitle: "Búsqueda",
refresh: true,
cloneToTop: true
},
{ width: 360, resize: false, closeAfterEdit: true, recreateForm: true, viewPagerButtons: true },
{ width: 360, resize: false, closeAfterAdd: true, recreateForm: true, viewPagerButtons: true },
{ }, //Delete action
{ closeAfterSearch: true, closeOnEscape: true }
);
有两个文本框和一个选择选项,我想知道如果我选择选择(第三列)的选项“Hora”,如何禁用“Precio Dia”(第一个文本框)列,另一种方式禁用“Precio” Dia' 如果我在选择中选择“Hora”!当我创建或编辑(没有内联编辑,我使用 navGrid)时,有没有可能的方法来做到这一点?
是否有任何属性(如禁用 html)可以添加到 colModel 定义中?
谢谢。