Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






How to dynamically make cell uneditable (inline edit mode)

UserPost

17:46
08/07/2012


XhiXhi

New Member

posts 2

How best do I dynamically disable edit (per row) on a particular cell depending on the value of another cell?  Thus, (for each row in a grid), if cell A meets my set criteria/condition, I want to disable edits on cell B.  The grid's in inline edit mode.


I got this working with the onSelectRow event — All cells are editable by default and I set the cell to uneditable based on meet a set condition as in this example below:

onSelectRow: function(id){
        var ret = jQuery(list).jqGrid('getRowData',id);
        if (ret.Arrived=='Yes')
         {
            jQuery(list).setColProp('Arrived',{editable:false});}
        else {  jQuery(list).setColProp('Arrived',{editable:true});}}


But, each time the user cancels an edit, all cells are reverted back to their initial state of editable and my event above does not fire in this case. 


How do I get this working both on initial load and after every edit or edit/cancel event? 


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

50 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9592

Posts: 28785

Membership:

There are 10172 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7009 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information