After reading documentation and googling once again and having not success with the dispatching of the beforeSumitCell event I have decided to post the question here. Here is the definition of my grid:
$(this).jqGrid({
url:dataUrl,
datatype: "json",
colNames:['Semana', 'Fecha', 'Precio D', 'Precio E'],
colModel:[{name:'week',index:'index1', editable:false,width:100},
{name:'date',index:'index2', editable:false, width:90},
{name:'priceD',index:'index3', editable:true, width:90},
{name:'priceE',index:'index4', editable:false, width:90}],
rowNum:53,
autowidth: true,
rowList:[53],
pager: jQuery('#pager1'),
sortname: 'id',
viewrecords: true,
sortorder: "desc",
editurl:"clientArray",
onSelectRow: function (id)
{
if(id && id!==lastJQGridSel)
{
$(this).jqGrid('restoreRow',lastJQGridSel);
$(this).jqGrid('editRow',id,true);
lastJQGridSel=id;
}
},
beforeSubmitCell : function(rowid, name,val,iRow,iCol)
{
alert("beforeSubmitCell called");
},
caption:"Modality prices"
});
Could anybody guess why it is not firing? Event calling stack says this event can be used with cellSubmit setting ‘clientArray’. And it will fire only for a cells wich editable flag is set to true. In my case priceD.
To try to fire the evnet I just click on a cell for the priceD column and enter a value and hit enter.
Thanks in advance.
jqGrid supports three editing modes: inline editing, form editing and cell editing. You use editRow which is part of inline editing, so to don’t call the callback function beforeSubmitCell which is the part of the cell editing.