DataGrid ItemEditor with Two Input Fields
Several folks have been asking about how to have a DataGrid ItemEditor with two input fields (say you want to separately edit first name and last name or something like that).
It's a bit tricky because of some missing pieces in the underlying Flash focus APIs and because of how Focus events work. Here is my take on how to do it. Usual caveats apply (i.e, code is not supported and may have bugs etc).
Comments
very nice!!
good work.
Posted by: Narendar | August 20, 2008 7:26 AM
Interesting that "createChildren" gets called everytime you click on the cell.
I modified yours a little bit to use two comboboxes and I was wondering why in "commitProperties" my comboboxes "dataProviders" were always empty even though I had set them once before :)
----------------
Alex responds:
Editors get re-created every time. I haven't proven it yet, but I think you could create a custom IFactory that recycles a single editor instance
Posted by: codecraig | August 21, 2008 5:19 AM
How can I specify background color to the footer? I tried using beginFill function of the Shape, but no luck.
-------------------
Alex responds:
Try the graphics object in the footer.
Posted by: NS | September 2, 2008 3:16 PM
Can something similar be done with a TileList TextInput ItemRenderer - i can't seem to get tabbing to work.
-----------------------
Alex responds:
TileList doesn't support editing. You'ld have to add all of that code first.
Posted by: Eric Belair | October 17, 2008 8:24 AM