Generally, in order to edit grid data there must be an explicitly defined underlying data shape.  In some cases, however, a developer might need to pass a dynamically crated data shape to a grid so that information can be displayed in a mashup.  Unfortunately, in situations like this, the data displayed in the grid can not be edited in-line.  This is a limitation of the TWX platform.  Fortunately, there is a work around.  I'm going to document the steps my team and I took, to overcome this limitation.


I don't believe editing data in-line directly in the grid widget is very elegant and it definitely seems to affect performance on grids with a lot of data and many editable columns.  I actually prefer a pop-up mashup when it comes to editing grid data.  So sticking with preference, this work-around requires that you create a pop-up mashup with all the fields you'd like to edit.  Also, the data driving your grid must reside in a data table.


Here's the solution:


Create a mashup that you will use as a pop-up window.  On the mashup, include all the fields you wish to be able to edit.  Include a "Save" button.  Configure the mashup to have one parameter for each field on the mashup. 


On your grid, configure the double-click event to call a service which takes the "Selected Row(s)" as input.  Since you know what your selected row looks like, from a data shape perspective, even though there isn't one specifically assigned to the grid, you'll be able to parse the infotable to extract the values of the fields you want to edit.  Be sure to include the ID--just don't display it on your pop-up if it's not needed. Return those values in a new infotable using a new DS of just those fields.  This new service now has an explicitly defined result data shape that you'll be able to use to map each one of the fields to a corresponding field on your mashup pop-up.   Use the service complete event to trigger a navigate widget which launches your pop-up. 


The pop-up will launch and all your fields will contain the corresponding data from the selected row in the grid.  Make whatever changes you need  to your data and then when a user clicks the the "Save" button, call a new service which takes all the values from your pop-up mashup and uses the ID field which you also passed in to do an update query on your data table.  When the user closes the pop-up, call the same service you initially called to populate your grid.  The grid will refresh with the updated data.