AnsweredAssumed Answered

Edit SQL non-spatial data table

Question asked by mbalwanz on Feb 6, 2013
Latest reply on Jun 4, 2013 by mbalwanz
I have a table that i was able to publish in a map service and query it to populate a datagrid in my application.  I need to allow users to edit the data from this table using the datagrid, but have been unable to figure out how to do this.

I did use an 'itemFileWriteStore' to populate the grid with the queried records from the table. 

Here is the html for the grid.
[HTML]                <table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid"  id="grid" data-dojo-props="rowsPerPage:'5', rowSelector:'20px'" style="margin-top: 30px; height: 168px;">
                            <th field="GenSurvID" >General Survey ID</th>
                            <th field="SurveyorID" >Surveyor ID</th>
                            <th field="SpecificDate" >Specific Date</th>
                            <th field="Book" >Book</th>
                            <th field="PageNum" >Page Number</th>
                            <th field="DocLink" formatter="makeLink" >Document Link</th>
                            <th field="SurveyNum" >Survey Number</th>
                            <th field="Section" >Section</th>
                            <th field="Township" >Township</th>
                            <th field="Range" >Range</th>
                            <th field="EstimatedDate" >Estimated Date</th>
                            <th field="CntyRemarks" width="100%">County Remarks</th>

here is the code that populates the grid...
function showResults(selectedFeatures) {                 var results = selectedFeatures.features;                 if (results.length != 0) {                    //create array of attributes                    var items =, function (result) {                         return result.attributes;                    });                     //Create data object to be used in store                    var data = {                        identifier: "GenSurvID",  //This field needs to have unique values                        items: items                    };                     //Create data store and bind to grid.                    store = new{ data: data });                    var grid = dijit.byId('grid');                    grid.setStore(store);                    grid.editable = true;                 } else {           = 'block';                }                 if (divToggleDetail.className == 'divToggleDetailExpand') {                    AnimateDetailsView()                }                 HideLoadingMessage2();             }

Any help would be greatly appreciated.