tags:

views:

615

answers:

1

I'm having difficulty getting my Dojo Grid to become editable. I'm using Dojo 1.3 from Google.

<script type="text/javascript" 
    src="http://ajax.googleapis.com/ajax/libs/dojo/1.3/dojo/dojo.xd.js"
    djConfig="parseOnLoad:true, isDebug: true"></script>

I've got my data in JSON format and it shows up correctly, but I can't get it to become editable with the table as I currently have it:

<div dojoType="dojo.data.ItemFileReadStore" jsId="dataStore" data="gridData"></div>
<table id="gridNode"
  class="traitsContainer"
  dojoType="dojox.grid.DataGrid"
  store="dataStore"
  query="{}"
  singleClickEdit="true"
  selectable="true"
  editable="true"
  rowsPerPage="20">
 <thead>
  <tr>
   <th field="field1" selectable="true"
     singleClickEdit="false" editable="false">
    Field 1
   </th>
   <th field="field2" selectable="true"
     singleClickEdit="true" editable="true">
    Field 2
   </th>
   <th field="field3" selectable="true"
     singleClickEdit="true" editable="true">
    Field 3
   </th>
   <th field="field4" selectable="true"
     singleClickEdit="true" editable="true">
    Field 4
   </th>
   <th field="field5" selectable="true"
     singleClickEdit="true" editable="true">
    Field 5
   </th>
  </tr>
 </thead>
</table>

Any ideas as to what I'm doing wrong?

A: 

You need to use an ItemFileWriteStore. The ItemFileReadStore is read-only.

seth
THANK YOU! I had already checked all the big things, figures it'd be something small like that! :)
Mike Carey
You are welcome.
seth