edit attributes from datagrid - no map

3801
6
02-16-2012 05:57 AM
JaredAllen
New Contributor
i've seen a few posts about editing feature attributes from within a datagrid (no map). i'm attempting to create a strictly attribute query/edit/update web page to give data managers the option to query features based on dynamically created query.where clauses which are set based on form entries/selections.

the following post give some good advice:
http://forums.arcgis.com/threads/41785-DataGrid-field-update-and-styling

i understand the theory of getting data into a grid and styling it, and i think i get how the update function works using the ItemFileWriteStore.setValue(item, columnName, value) function.

however, i am missing the part how to enable the grid to be edited, that is how do i allow user to click in grid cell and accept/capture the typing event and new text? the data grids i've see thus far are clickable with events to zoom, but can't enter new text into a cell... that's the part i need help with.

thanks for any comments or resource suggestions.
0 Kudos
6 Replies
KellyHutchins
Esri Frequent Contributor
You have to set the editable property to true for the cells you want to edit. You can find more info here:

http://dojotoolkit.org/reference-guide/dojox/grid/example_Editing_data.html
0 Kudos
JulieK
by
Occasional Contributor

Hey Kelly,

I have a question for you

Based on the above link , I have created a grid and made it editable too. For my purpose, I need to take let's say the first row and create parameters out of it and send to a geoprocessing service. What is the best way to access each row and column so I can send it as parameters.

Based on all the documentation, it looks like dgrid takes the entire dataset and sends it to a server but I don't want to do that.

Please help!!

0 Kudos
KenMorefield
Occasional Contributor
Hi Jared,
The link that Kelly provided is a good starting point.  Spend some time googling "dojo.data.ItemFileWriteStore" and reading as much as you can about it.  There are many examples of how it works.  I use dojo.data.ItemFileWriteStore a lot to allow clients to enter/update attributes in a tabular grid format.  These attributes are then associated with map graphics (essentially assigning a Lat/Long coordinate to each row in the grid).  I then pass these map graphics to a geoprocessing service, which appends the data to an underlying geodatabase feature class.  Essentially, it allows the end-user to "append" data in bulk.  Rather than editing one feature at a time like some of the ESRI samples show, a user can populate 20 or 30 or more records in one pass.  What you are trying to do could be easily implemented with the "dojo.data.ItemFileWriteStore."  You could also just use individual controls like "dijit.form.TextBox" or "dijit.form.FilteringSelect" and then string together their values into a query.where statement.

Ken
0 Kudos
JulieK
by
Occasional Contributor

Hi Ken,

I am trying to edit attributes value of a feature service in ArcGIS online. Currently, I am using ArcREST to update the table in ArcGIS online each record at time. Is there a way to update a bunch of records at once? Please share the information.

0 Kudos
JaredAllen
New Contributor
thank you for the help so far. here's a link to the initial data grid which i've enabled: http://ags.northwindgrp.com/itd-mobile/manage.htm (the first two dataset options are wired up, the others are placeholders).

i will review the dojo.data.ItemFileWriteStore function and see where i get.

preemptively, though, i will want the values to honor any coded value domains... any thoughts as to whether that is possible using the dojo grid?
0 Kudos
HaniuHokkaido
New Contributor III
Hi,

Are there any samples on editing datagrid in web app (the datagrid is linked with the map) ?

Thanks
0 Kudos