I wrote a custom item editor for a datagrid in flex. My question is how to retrieve the pre-edited value of the datagrid cell after the item editor initializes and also in the custom item editors code.
How to retrieve the pre edited value of the cell of a datagrid to an itemeditor in a flex
1.9k Views Asked by AudioBubble At
2
There are 2 best solutions below
0
Fabi1816
On
In the "itemEditEnd" event you can access the old value as:
var oldValue:String = event.currentTarget.dataProvider[event.rowIndex].VALUE_FIELD;
and the new value as:
var txtControl:mx.controls.TextInput = event.currentTarget.itemEditorInstance as mx.controls.TextInput;
var newValue:String = txtControl.text;
If you are using a custom itemRenderer you need to change "mx.controls.TextInput" for your custom itemRenderer.
Related Questions in APACHE-FLEX
- call Win32 API in flex to set Window Display Affinity
- Adding a listener to a VerticalScrollBar in flex
- Two ane file conflict in one flex mobile application
- Using AS3 Timer & distriqt Notification ANE To Send Notifications While In Sleep Mode
- Creating a vertically draggable container in Adobe Flex 3.5
- There is no save() method in FileReference Class of Flex
- Passing data between MXML files and opening one after Click on another
- How to check a Number in mxml?
- Strange flex module behavior.Module become null when add a little nonsense code
- AS3 can't find the load method on a Loader
- 2032 Flex error while contacting HTTPS REST services
- Error Message not generated
- ASC2 compiler with Flash Builder 4.6
- Is there a class in AS3 that tells you the type of the URL protocol?
- Skip window from being captured
Related Questions in DATAGRID
- Login form by using a new database, made in VB
- Exporting Datatable
- WPF DataGrid Move to last selected row without highlight recent clicked row
- reactjs datagrid use html
- C# WPF DataGrid - Processing a Dictionary inside a class into column components in the datagrid
- WPF converter column ItemsSource
- Edit DataGrid Cell on mouse over
- Can't put Dropdownlist into a Datagrid
- Outter joins in LINQ query
- Update DataGrid cell if other cell changes
- Binding DataGirdComboBoxColumn to DataSet doesn't work
- Wpf datagrid scrollbar freezes
- Why is wpf UpdateSourceTrigger not binding explicitly?
- GWT DataGrid column width issue after removing columns
- DataGridRowTemplateColumn - refactoring and using styles efficiently?
Related Questions in RETURN
- Recursive function in PHP function : how to prevent return value?
- PHP: Body is displaying 0
- can you use c code to read a .txt file size?
- Scala: "explicit return" required?
- Java "add return statement" error
- Assigning (or tieing in) function results back to original data in pandas
- Returning a formatted string does not working properly
- What does this mean? return func()
- I need to find the longest word in a sentence using JS
- Java: Inheriting method with return type
- Returning boolean from oracle function or procedure with out parameter
- Prolog- Returning elements from facts
- Reintroduction of AR and GARCH processes in MATLAB
- Javascript return in function in object won't show alert box
- Javascript Calling Versus Returning Functions
Related Questions in ITEMEDITOR
- Replace comma with dot in Flex HierarchicalData with own renderer as itemEditor does not work
- Flex DropDownList fires focus out on scroll when used in datagrid item editor
- Combobox's list not in proper position
- Make item editor editable of the advancedatagrid in flex
- how to prevent itemeditor destruction?
- Selection in a ComboBoxEditor change the row selected in DataGrid
- Emeditor Multiple Marking
- How ItemRenderer is different from ItemEditor in Flex 4?
- Flex dispatchEvent to exit an ItemEditor
- Gettinf Property **text** not found error in DataGrid
- destroy open item editor or item renderer in flex
- Flex 3: Datagrid as item editor gets 'itemEditEnd' prematurely
- flex: cant edit item in Datagrid with override set data method
- How to retrieve the pre edited value of the cell of a datagrid to an itemeditor in a flex
- Using a ComboBox as ItemEditor in Flex 4
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I don't think it is possible to get the old value once you are in the item editor. I would do this manually by listening to the "itemEditBeginning" event and keeping a variable with the value of the cell. You can then reference that value through the "parent", "parentDocument" or "outerDocument" properties in the item editor, depending on whether you are using an inline item editor or a separate class.