Forum Discussion
HKosova
Alumni
15 years agoHi Ashish,
You seem to have faced a limitation with using the wValue property to set values in Flex mx DataGrid controls:
In other words, try something like this instead:
Let me know how it works for you.
You seem to have faced a limitation with using the wValue property to set values in Flex mx DataGrid controls:
If the grid is bound to a “raw” data object, such as Array, XML or XMLList, assigning a value to the wValue property changes only the cell’s display value but does not modify the grid’s underlying data source. In this case, the displayed value is reset the original value once the grid refreshes.
To change cell values in an editable grid, simulate actual input into in-place editors. For example, use the ClickCell action to activate the in-place editor, then simulate entering or selecting a new value, and then use Keys("[Enter]") to commit the changes.
In other words, try something like this instead:
dataGrid.ClickCell i, j
dataGrid.Keys "^a[Del]New Value[Enter]" ' Clear the old value using Ctrl+A and Del, then enter a new value and press Enter
Let me know how it works for you.