title: error on a dojo grid when adding new item to the store
body: <p>I'm stuck with a problem on a dojo grid when adding new item to the store.
  I've got :</p>
  
  <ol>
  <li>a dojox/grid/EnhancedGrid containing articles </li>
  <li>a tabcontainer where the tabs represent article's family.</li>
  </ol>
  
  <p>Each time I choose a tab , it filters the grid to display that family, so far everything work fine.</p>
  
  <p>But I've a button that allows to add a new article to the grid through a new window.
  If the grid is not filtered no problem , but if i've got a tab selected I get the error:
  <strong>grid assertion failed in itemwritestore</strong>
  Same error on FF and IE, I search internet for that error but i didn't find anything revelant.</p>
  
  <hr>
  
  <p>My code if its helps ...</p>
  
  <pre><code>                var grid=parent.registry.byId('lagrid');
          var items=lagrid.store._arrayOfAllItems;
          var item=items[e.rowIndex];
          var lestab=parent.registry.byId( 'TabContainerRayon');
          var tabsel=lestab.selectedChildWidget.id
          var ongletR=tabsel.substring(1,tabsel.length);
          if (grid)
          {
              var storeParent=grid.store;
              var itemsParent=storeParent._arrayOfAllItems;
              for (i=0 ; i&lt; itemsParent.length ; i++)
              {
                  if (itemsParent[i].col17==idLigne)
                  {
                       alert("Article déjà présent");
                      return false;
                  }
              }
              var myNewItem = {
              id: grid.rowCount+1,
              col2:trim(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"Col5")),
              col3:undefined,
              col4:undefined,
              col5:trim(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"Col6")),
              col6:trim(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"Col8")),
              col7:undefined,
              col8: undefined,
              col9: undefined,
              col10: 1,
              col11: undefined,
              col12:trim(lagrid.store.getValue(lagrid.getItem(tabInd[0]),"Col1")),
              col13:trim(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"Col2")),
              col14:'&lt;A HREF="javascript:addProduit('+ (grid.rowCount)+');" &gt;&lt;IMG border=0 SRC="/'+CheminBase+'/Flag_White.gif"&gt;&lt;/A&gt;' ,
              col15: ongletR,
              col16:"&lt;a href=\"javascript:afficheImg("+grid.rowCount+",'"+trim(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"unid"))+"')\"&gt;&lt;img src='/" + CheminBase + "/pictures.png?OpenImageResource' border=0&gt;&lt;/a&gt;",
              col17:idLigne ,
              col18:trim(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"Col9"))
              };
  
              parent.PctPrixTolere.push(parseInt(lagrid.store.getValue(lagrid.getItem(e.rowIndex),"Col7")));
              parent.PresenceReleve.push("0");
  }
          // ajoute l'item dans le store
          grid.store.newItem(myNewItem);
          grid.store.save();
          parent.registry.byId('external').hide();
  </code></pre>
  
  <hr>
  
  <p>Thanks for your help</p>