when i draw the grid i have some column like this..
name: 'codigo', index: 'codigo', width: 50, align: 'center', editable: true }
But after i want to do a query and then set the editable option, for example to false, is this possible?
Thanks.
You can get reference to internal colModel
using getGridParam
:
var colModel = $("#grid").jqGrid("getGridParam", "colModel");
Now you can enumerate elements in colModel
array and find the element which has property name
with the value "codigo"
. After that you can modify editable
property of the element of colModel
array. Look at getColumnIndexByName
function from the answer for a code example.
The most simple way to do what you want is the usage of setColProp method
$("#grid").jqGrid("setColProp", "codigo", {editable: false});
` or you includes HTML fragments in the server response? Do you have any customization of CSS? – Oleg Feb 27 '13 at 12:07
between two values in the string of the server response. Not, i havent any customization by CSS, and i cant implement the white-space option of CSS because one or both values can contains white spaces..I hope that you understand me this time. Sorry for my english. Thanks. – bombai Feb 27 '13 at 12:12