I want to show the session column based on the corresponding cell value of the type row. The session column is hidden.
To hide the session column, I used this below code snippet,
{ name: 'session', index: 'session', hidden:true, editrules:{edithidden:true} },
So, I just want to show this column value only in view . If the cell type value is Full , I want to hide session in view . Otherwise, I want to show the value of the session column in view .
I tried using this code below,
onSelectRow: function (id) { var celValue = $('#statGrid').jqGrid('getCell', id, 'type'); if (celValue === 'Full') $('#statGrid').jqGrid('getColProp', 'session').editrules.edithidden = false; if (celValue === 'Half') $('#statGrid').jqGrid('getColProp', 'session').editrules.edithidden = true; }
As soon as the first if condition gets a successful edithidden property, changed to false . So, it hides session in the form of a view. But I could not change this property to true when my second if condition succeeded.
Why did this happen? Is this the right way to accomplish this task? or is there a better way to do this?
jquery dependencies jqgrid
CJ Ramki Apr 02 '14 at 13:43 on 2014-04-02 13:43
source share