'jqGrid - setColProp()

Is it possible to add row id to the setColProp() of jqGrid?

When I dynamically set "editable":false for a column, it sets "editable":false for ALL columns in the grid and not for a particular column of a particular row.



Solution 1:[1]

You can change the column property (for any column) before you call editRow and reset it back directly after the call editRow. In the way you can implement full dynamical editable option. See the answer for the code example.

Solution 2:[2]

You can using properties of column

{ name: 'COMPANY_ID', index: 'COMPANY_ID', align: 'left', editable: true }

After that you can set for col:

$("#grid").jqGrid('setColProp', 'COMPANY_ID', { editable: false });

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 Hong Van Vit