title: jqGrid TableToGrid delete a row
body: <p>I am trying to use tabletogrid function in the <a href="http://www.trirand.com/blog/" rel="nofollow">jqgrid plugin</a>. My problem is if I delete a row in table then the width attribute of the table cells just disappears. But if the last row is deleted then the delete operation happens as expected.
  For example, here's my html table - </p>
  
  <pre><code>&lt;table id="item_table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th width="60"&gt;Date&lt;/th&gt;
              &lt;th width="15"&gt;Icon&lt;/th&gt;
              &lt;th width="80"&gt;Shop&lt;/th&gt;
              &lt;th width="15"&gt;Delete&lt;/th&gt;
          &lt;/tr&gt;
      &lt;thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td width="60" class="col_date"&gt;
                  &lt;div class="date"&gt;&lt;/div&gt;
              &lt;/td&gt;
              &lt;td width="15" class="col_icon"&gt;
                  &lt;div class="icon"&gt;&lt;/div&gt;
              &lt;/td&gt;
              &lt;td width="80" class="col_shop"&gt;
                  &lt;div class="shop"&gt;&lt;/div&gt;
              &lt;/td&gt;
              &lt;td width="25" class="col_delete"&gt;
                  &lt;div class="delete"&gt;&lt;/div&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Then I add the contents to the table using an ajax code. After that here's my jqgrid setting.</p>
  
  <pre><code>    jQuery.extend(jQuery.jgrid.defaults, {
          caption: "Shops",
          autowidth: true,
          height: 24,
          hidegrid: false,
          onCellSelect: function(rowid, index, contents, target) {
              if (index == 3) {
                  $('#item_table tr:eq(' + rowid + ')').remove();
              }
          },
          colModel:[
              { name: 'date', index: 'date', width: 0, resizable: false },
              { name: 'icon', index: 'icon', width: 0, resizable: false },
              { name: 'shop', index: 'shop', width: 0, resizable: false },
              { name: 'delete', index: 'delete', width: 0, resizable: false }
          ]
      });
      tableToGrid("#item_table", {
          colNames: ['Date', '', 'Shop', 'Delete']
      });
  </code></pre>
  
  <p>The delete action causes the width attribute to disappear. Why is this happening?</p>
  
  <p>The cells in the grid get displayed like this...</p>
  
  <pre><code>&lt;TD style="WIDTH: 80px" title="" role=gridcell&gt;&lt;DIV class=shop&gt;&lt;/DIV&gt;&lt;/TD&gt;
  </code></pre>
  
  <p>If delete any row except the last row, the cells become like this....</p>
  
  <pre><code>&lt;TD title="" role=gridcell&gt;&lt;DIV class=shop&gt;&lt;/DIV&gt;&lt;/TD&gt;
  </code></pre>
  
  <p>Width attribute gets removed. What am I missing over here?</p>