I am really new with JqGrid !!! and.. I am trying to tweak a lil the basic forms I was reading a lot of comments but I didn't find nothing for my case
I have this part of code for my table table
….
colNames:['Deployment id','Branch', 'Release Name','Client id','# of hosts','Comments',''],
colModel :[
{name:'deployment_id',index:'deployment_id',align:"right", sorttype:"int", width:120},
{name:'branch',index:'branch',align:"center", editable: true,edittype:"select",editoptions:{value:"1:valor1;2:valor2;3:valor3"}},
{name:'release_name',index:'release_name',align:"center"},
{name:'client_id',index:'client_id',align:"right", sorttype:"int", width:60}, {name:'num_hosts',index:'num_hosts',align:"right", sorttype:"int", width:60},
{name:'comments',index:'comments',align:"center", editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"20"}},
{name:'myac', width:80, fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:true}} ],
….
I need modify my edit/add dialog form in order to When I add: Branch and Comment are available When I edit: branch is disable and Only Comment can be modified
both actions are using the same method how I can know If i am editing or adding in order to hide/show the fields?
Thank you