DataGrid field update and styling

7492
32
10-17-2011 08:26 AM
SamirGambhir
Occasional Contributor III
Hi,
I have two questions related to Dojox Data Grid:
1. I have an application where the datagrid has two columns. One column always displays unique names (e.g. state names) and the second column has to display indicator value for each state depending on which indicator is selected i.e. When user selects 'Population' from a dropdown select form, the second column displays its value. I would like this column to refresh its value when user makes another selection. The data grid examples on esri.com show hard-coded field name in the HTML markup. Is there a way to make the field name dynamic?
2. Is there a way to apply my own css style to the table (cells, borders, heading etc.)?
Thanks for your help,
Samir
0 Kudos
32 Replies
LindaDunklee
New Contributor III

I am having the same issue with this as Adam mentions above - my updated values don't persist when I redo the search.  My service is also enabled to allow editing and the value changes in the grid until the search is redone.  Checking the database, the value does not change.  Has anyone been able to resolve this issue?

0 Kudos
thejuskambi
Occasional Contributor III

Hello Linda

The updateDataGrid.txt does not have any logic to update the server. i.e. no code is calling the featurelayer.applyedits method. the store.setValue updates only the memory variables so as long, you dont search again the values you have updated will remain. But if you get the records again from the service. The original values will be returned.

Hope this answers your doubt.

Thejus

0 Kudos
LindaDunklee
New Contributor III

Thanks thejus, this makes sense!  Forgive my ignorance - with the existing code above, what would be the easiest way to commit the edits to the server?

0 Kudos