Hi Alex, I'm pretty much sure given that the tabbing works when I remove the itemEditEnd event handler. Removing the handler causes the value in the text box to disappear or not update. :(
Is there any way to not make the itemEditEnd's preventDefault() not mess with the tab order? TIA, sasuke Alex Harui wrote: > > Hmm. There isn't that much going on in the default itemEditEnd handler. > Are you sure that's the issue? When I looked at your code, I thought your > logic as to when and where to set focus was suspect and not the same as my > logic. > > Alex Harui > Flex SDK Developer > Adobe Systems Inc.<http://www.adobe.com/> > Blog: http://blogs.adobe.com/aharui > > From: [email protected] [mailto:[email protected]] On > Behalf Of sasuke > Sent: Monday, November 16, 2009 12:34 AM > To: [email protected] > Subject: RE: [flexcoders] Datagrid woes -- IFocusManagerComponent & > ItemEditors > > > > Hi Alex, > > Thanks for your suggestion. After comparing my code with your code, the > difference I found was that you aren't using/capturing any sort of > itemEditEnd event which I'm using in my code. The issue this is causing is > that since I use the "event.preventDefault()" in the handler code, the > tabbing code doesn't work correctly in the sense that I need to press TAB > twice to move the control out of my custom editor. Something like: > > private function processData(event:DataGridEvent):void > { > if(event.reason == DataGridEventReason.CANCELLED) return; > if(event.dataField == "married") > { > event.preventDefault(); > var data:Object = myGrid.editedItemRenderer.data; > data['married'] = > > HboxRenderer(DataGrid(event.target).itemEditorInstance).checkBox.selected; > data['numOfChildren'] = > > Number(HboxRenderer(DataGrid(event.target).itemEditorInstance).txtInput.text); > (myGrid.dataProvider as > ArrayCollection).itemUpdated(myGrid.itemEditorInstance.data); > myGrid.destroyItemEditor(); > trace("Updating value of column: " + event.columnIndex + " row: " + > event.rowIndex); > } > } > > Any suggestions to ensure that calling event.preventDefault just prevents > the datagrid from messing with my binding values and not mess up the tab > order? If the question is still unclear or hazy, please let me know! :) > > TIA, > sasuke > > Alex Harui wrote: >> >> The longer it takes to understand the question(s), the less likely it is >> that someone will have time to respond. Fortunately for you the source >> code repository is undergoing maintenance so I had time to dig further. >> >> Everything looks ok, but you might want to compare your editor with the >> one in this post: >> http://blogs.adobe.com/aharui/2008/08/datagrid_itemeditor_with_two_i.html >> >> Alex Harui >> Flex SDK Developer >> Adobe Systems Inc.<http://www.adobe.com/> >> Blog: http://blogs.adobe.com/aharui >> >> From: [email protected]<mailto:flexcoders%40yahoogroups.com> >> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] >> On >> Behalf Of sasuke >> Sent: Thursday, November 12, 2009 6:34 AM >> To: [email protected]<mailto:flexcoders%40yahoogroups.com> >> Subject: Re: [flexcoders] Datagrid woes -- IFocusManagerComponent & >> ItemEditors >> >> >> >> Apologies for the resurrection but any suggestion here would be >> appreciated. >> Is using external sites for pasting code [pastie, pastebin] not >> acceptable >> here? Would you like me to post the entire code here? Or maybe re-frame >> my >> question? >> >> TIA >> -sasuke >> >> sasuke wrote: >>> >>> Hi folks, >>> >>> Recently I've been trying to code up a datagrid which would satisfy the >>> following requirements: >>> - should be keyboard enabled i.e. each and every column should be >>> tab-aware >>> - should support hybrid/custom renderers/editors >>> - capable of communicating changes to the underlying dataprovider >>> >>> I have created a small sample application but it kinda fails miserably >>> at >>> meeting the above mentioned goals. The issues are: >>> - Tabbing still doesn't work with custom renderers/editors >>> - Disappearing data from the datagrid i.e. changes made to the text >>> field >>> not reflected in original collection >>> >>> The three files used are as follows: >>> - http://pastie.org/692226 Person VO >>> - http://pastie.org/692229 Custom item editor >>> - http://pastie.org/692233 Main application file >>> >>> Any kind of help/code review/suggestions/tips/links would be much >>> appreciated. >>> >>> TIA, >>> sasuke >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Datagrid-woes----IFocusManagerComponent---ItemEditors-tp26287347p26319736.html >> Sent from the FlexCoders mailing list archive at Nabble.com. >> >> >> > > -- > View this message in context: > http://old.nabble.com/Datagrid-woes----IFocusManagerComponent---ItemEditors-tp26287347p26368358.html > Sent from the FlexCoders mailing list archive at Nabble.com. > > > -- View this message in context: http://old.nabble.com/Datagrid-woes----IFocusManagerComponent---ItemEditors-tp26287347p26453893.html Sent from the FlexCoders mailing list archive at Nabble.com.

