Home › Forums › Guriddo jqGrid JS › Help › Set a colum readonly in edit mode but not in add mode
Hi,
I'm using form editing. when I use beforeShowForm, how can I set
I tryed with
beforeShowForm: function(formid) {$(“#list”).setColProp('Fondo', {editoptions:{readonly: true} });$(“#list”).setColProp('Valido Dal', {editoptions:{readonly: true}});},
but didn't work.
Any idea?
Thanks
Mirko
Hello,
You are close to the solution.
Define two separate beforeShowForm events
For edit
beforeShowForm : function (formid)
{
$(”#Fondo”, formid).attr(“readonly”,”readonly”);
…
}
For Add
$(”#Fondo”, formid).removeAttr(“readonly”);
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS