title: SAPUI5 Table: unbindRows & destroyColumns cause error: Cannot read property 'shouldRender' of undefined
body: <p>I am using the <code>Table</code> object from the <code>SAPUI5's sap.ui.table</code> namespace:</p>
  
  <blockquote>
    <p>var oTableOverview = new sap.ui.table.Table();</p>
  </blockquote>
  
  <p>On <code>rowSelectionChange</code>, when selecting one row I populate another table, let's call it <code>oTableDetail</code>, that is filled with some data.</p>
  
  <p>When deselecting the row from the first table, I want to clear the content of the second, and for that I use:</p>
  
  <blockquote>
    <p>oTableDetail.destroyColumns();</p>
    
    <p>oTableDetail.unbindRows();</p>
  </blockquote>
  
  <p>When deselecting the row I get the following error:</p>
  
  <p><strong>TableRenderer.js:6 Uncaught TypeError: Cannot read property 'shouldRender' of undefined</strong></p>
  
  <p>I found the method <code>shouldRender</code> of the <code>sap.ui.table.Column</code> class, but I am not sure why would the cells be rerendered in this case.</p>
  
  <p>I also noticed that if I use either <code>oTable.destroyColumns()</code>, or <code>oTable.unbindRows()</code> <strong>separately</strong>, the error does not appear.</p>
  
  <p>I am using the "1.38.11" version of SAPUI5.</p>
  
  <p>Can you please help me identify why this happens?</p>
  
  <p><strong>EDIT 1</strong>:  A possible <em>workaround</em> would be to use:</p>
  
  <blockquote>
    <p>oTableDetail.setModel(new sap.ui.model.json.JSONModel({}));</p>
    
    <p>oTableDetail.destroyColumns();</p>
  </blockquote>
  
  <p>Although I still don't know why the code mentioned before is not working.</p>
  
  <p><strong>EDIT 2</strong>: A behavior that I find a bit weird: </p>
  
  <p>trying to add a setTimeout like this works (the error is not happening):</p>
  
  <blockquote>
    <p>oTable.destroyColumns();</p>
    
    <p>setTimeout(function(){  oTable.unbindRows();  }, 50);</p>
  </blockquote>
  
  <p>but this other way it doesn't work (the error still appears) even if the delay is longer:</p>
  
  <blockquote>
    <p>oTable.unbindRows();</p>
    
    <p>setTimeout(function(){  oTable.destroyColumns();  }, 50);</p>
  </blockquote>