Note that there are some explanatory texts on larger screens.

plurals
  1. POJQGrid readonly and edit option
    primarykey
    data
    text
    <p>Can anyone tell me how I can make inline editing for one particular column false, but when you edit the particular row that colum is editable for example -</p> <p><code>{name:'product_image', index:'ProductId', width:25, align:'right', editable:true, edittype:'file'}</code>,</p> <p>This works perfectly, I can edit this by selecting the row and clicking the edit button&lt; I will then be presented with the edit dialog, I can then change the value of said column. I want to make the column in the grid view readonly however, I have found the following -</p> <pre><code>{name:'product_image', index:'ProductId', width:25, align:'right', editable:false, edittype:'file',editoptions:{readonly: false}}, </code></pre> <p>However this just makes the column read only and in edit mode I cannot change the value.</p> <pre><code>$("#list").jqGrid({ url:'products.php?storeId=&lt;?php echo $_SESSION["valid_store"]; ?&gt;', datatype: 'xml', mtype: 'GET', colNames:['Product Id','Product Description','Department','Category','Price','Sale Price','Quantity','Extended Description','Web Item','Image'], colModel :[ {name:'ProductId', index:'ProductId', width:20}, {name:'product_name', index:'product_name', width:50, editable:true, edittype:'text', search:true, stype:'text'}, {name:'DepartmentName', index:'DepartmentName', width:40,sortable: false, editable: true, edittype: "select"}, {name:'CategoryName', index:'CategoryName', width:40,sortable:false, editable:true, edittype:'select'}, {name:'price', index:'price', width:15, align:'right', editable:true, edittype:'text'}, {name:'sale_price', index:'sale_price', width:15, align:'right', editable:true, edittype:'text'}, {name:'product_qty', index:'product_qty', width:10, align:'right', editable:&lt;?php if($edit_qty == 1){echo "true";}else{echo "false";} ?&gt;, edittype:'text'}, {name:'product_description', index:'product_description', width:100, sortable:false, editable:true, edittype:'text'}, {name:'web_item', index:'web_item', width:15,sortable:false, editable:true, edittype:'select',editoptions:{value:{1:'True',0:'False'}}}, {name:'product_image', index:'ProductId', width:25, align:'right', edittype:'file', editable: false}, ], loadComplete:function(){ $("#list").setColProp('DepartmentName', { editoptions: { value: departments} }); $("#list").setColProp('CategoryName', { editoptions: { value: categories} }); }, pager: '#pager', rowNum:40, rowList:[10,20,30,40,50,60,70,80,90,100], sortname: 'ProductId', sortorder: 'desc', viewrecords: true, gridview: true, caption: 'Products', autowidth: true, height: tableHeight, cellEdit: true, loadtext: 'Loading Products...', cellurl: 'edit_product.php?storeId=&lt;?php echo $_SESSION["valid_store"]; ?&gt;', editurl: 'edit_product.php?storeId=&lt;?php echo $_SESSION["valid_store"]; ?&gt;', }).navGrid('#pager', { del: false, add: &lt;?php if($add_products == 1){echo "true";}else{echo "false";}?&gt;, edit: true, search: true }, {jqModal:true,closeAfterEdit: false,recreateForm:true,onInitializeForm : function(formid){ $(formid).attr('method','POST'); $(formid).attr('action',''); $(formid).attr('enctype','multipart/form-data'); }, beforeShowForm:function(form){ $("#product_image", form).attr("disabled", "false"); }, </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload