Updating DataGrid store

3830
1
01-29-2015 11:26 AM
by Anonymous User
Not applicable

Given the following DataGrid:

<table data-dojo-type="dojox/grid/DataGrid" jsid="grid" id="grid" data-dojo-props="rowsPerPage:'5', rowSelector:'20px'" style="height:250px; width:100%">

          <thead>

            <tr>              

              <th field="ID">SEGID</th>

              <th field="BRANCH">Street</th>

              <th field="LANES">Lanes</th>

           <th field="CURB">Curb</th>

   <th field="SIDEWALK">Sidewalk</th>

   <th field="ALLIGATOR_CRACKS">Alligator</th>

   <th field="RAVELING">Raveling</th>

   <th field="SHOVING">Shoving</th>

   <th field="POT_HOLES">Pot Holes</th>

   <th field="EX_ASHPHALT">Ex Ashp</th>

   <th field="POLISHED">Polished</th>

   <th field="DRAINAGE">Drainage</th>

   <th field="RUTTING">Rutting</th>

   <th field="RIDE">Ride</th>

   <th field="RATING">Rating</th>  

   <th field="CIP">CIP</th>

            </tr>

          </thead>

        </table>

Is it possible to update the existing store for the DataGrid to account for "CIP" and a value for "CIP"? In other words, the field object for CIP and value for CIP does not exist in the store and would be added eventually by user input. Hope that makes sense.

Thanks!

0 Kudos
1 Reply
JoshHevenor
Occasional Contributor II

Now you said DataGrid but I may suggest dgrid. It comes packaged with ESRI's jsapi and might be what you meant anyway.  

Anyway, dgrid has an editor plugin that looks like it will fit your needs:

dgrid/editor.md at v0.3.15 · SitePen/dgrid · GitHub

By 'CIP does not exist in store' I would suggest that you create that field and leave it empty (so that the column exists but the field is empty/null in each record).