title: Conditionally enable or disable delete record button based on the Content of the cell (not just the the id)
body: <p>I am new to jquery and jqgrid, but i am comfortable with javascript. However I have managed to install jqgrid after some effort. </p>
  
  <p>I have been trying a to find a solution to enable ore disable the delete feature from the navigation bar based on the value of the 'lock' column. I read the following link
  <a href="https://stackoverflow.com/questions/5373693/jqgrid-how-to-set-toolbar-options-based-on-column-value-in-row-selected">jqgrid: how to set toolbar options based on column value in row selected</a></p>
  
  <p>But I was not able to get the contents of  'lock' cell for the javascript. I also tried to format the lock string without effect. </p>
  
  <p>the jqgrid is loaded via php. The script is here <a href="http://www.trirand.net/demophp.aspx" rel="nofollow noreferrer">http://www.trirand.net/demophp.aspx</a></p>
  
  <p>The php script is the  following</p>
  
  <pre><code>require_once("JQGrid/jq-config.php");
  require_once("JQGrid/php/jqGridASCII.php");
  require_once("JQGrid/php/jqGridPdo.php");
  $conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
  $grid = new jqGridRender($conn);
  $grid-&gt;SelectCommand = 'SELECT * FROM  `device_assignement` ';
  $grid-&gt;dataType = 'json';
  $grid-&gt;setColModel();
  $grid-&gt;setUrl('Grid_ecu_display.php');
  $grid-&gt;setColProperty("company", 
  
  
  array("label"=&gt;"Dealer Name", 
  "width"=&gt;350
  ), 
  array( "searchrules"=&gt; 
  array("searchhidden"=&gt;false, "required"=&gt;false, "search"=&gt;false)));
  
  
  
  
  $grid-&gt;setGridOptions(array( 
  "sortable"=&gt;true, 
  "rownumbers"=&gt;true, 
  "rowNum"=&gt;40, 
  "rowList"=&gt;array(10,50,100), 
  "sortname"=&gt;"ecu",  
  "width"=&gt;940,  
  "height"=&gt;400,  
  "shrinkToFit"=&gt;true,  
  "hidden" =&gt; true,
  "hoverrows"=&gt;true ));
  
  
  $grid-&gt;toolbarfilter = true;
  $grid-&gt;setFilterOptions(array("stringResult"=&gt;true));
  $grid-&gt;setColProperty("ecu", array(
  "label"=&gt;"ECU Number" ,  
  "sortable"=&gt;true
  ));
  
  $grid-&gt;setColProperty("lock", array(
  "label"=&gt;"&lt;i&gt;Lock&lt;/i&gt;" ,  
  "width"=&gt;60,
  "sortable"=&gt;false,
  "editable"=&gt;true
  ));
  </code></pre>
  
  <p>etc etc...</p>
  
  <pre><code>$ecu = jqGridUtils::GetParam('ecu'); 
  // This command is executed immediatley after edit occur. 
  $grid-&gt;setAfterCrudAction('edit', "UPDATE  `ecu_master` SET  `lock` =  '1'             WHERE  `ecu` =?",array($ecu));  
  
  
  $grid-&gt;navigator = true;
  
  $grid-&gt;setNavOptions('navigator', array("pdf"=&gt;true, "add"=&gt;false,"edit"=&gt;true,"del"=&gt;false,"view"=&gt;false, "excel"=&gt;true)); 
  
  
  
  $grid-&gt;setColProperty('company',array("searchoptions"=&gt;array("sopt"=&gt;array("cn"))));
  $oper = jqGridUtils::GetParam("oper"); 
  if($oper == "pdf") { 
  $grid-&gt;setPdfOptions(array( 
  // set the page orientation to landscape 
  "page_orientation"=&gt;"L", 
  // enable header information 
  "header"=&gt;true, 
  // set bigger top margin 
  "margin_top"=&gt;27, 
  // set logo image 
  //"header_logo"=&gt;"logo.gif", 
  // set logo image width 
  //"header_logo_width"=&gt;30, 
  //header title 
  "header_title"=&gt;"Autograde CMS ECU Allocation List", 
  // and a header string to print 
  "header_string"=&gt;"$SoftwareVersion" 
  )); 
  } 
  // Run the script
  $grid-&gt;renderGrid('#grid','#pager',true, null, null, true,true);
  </code></pre>
  
  <p>This is included in another php script where.
  All I want is to enable or disable the delete row button based on the "lock" value 
  If this seems too basic and ridiculous please let me know I will understand.</p>