Re: [flexcoders] Re: datagrid.selectedIndex not correct in cellPress - flex2
On 2/10/06, bhaq1972 [EMAIL PROTECTED] wrote: mx:DataGrid cellPress=cellPressEvt(event); event is of type DataGridEvent. i tried mx:DataGrid cellPress=cellPressEvt(event:mx.events.DataGridEvent) but flexbuilder 2 comes up with a compile error Expecting right parenthesis after colon event *is* of type DataGridEvent already. See the generated AS code. What you want instead is to type the argument to the cellPressEvt method as DataGridEvent: mx:DataGrid cellPress=cellPressEvt(event) private function cellPressEvt(event:DataGridEvent):void { ... } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: datagrid.selectedIndex not correct in cellPress - flex2
On 2/9/06, bhaq1972 [EMAIL PROTECTED] wrote: a couple of follow up questions; 1) everything is now alot more strictly typed. then why isn't the 'event' parameter strictly typed ?(in the 2nd datagrid example in livedocs) eg mx:DataGrid cellPress=cellPressEvt(event); event is of type DataGridEvent. 2) i want dg.focusedCell = {rowIndex:2, columnIndex:2} no matter where the user clicks on the editable datagrid. any ideas? I think you'll have to dispatch your own event. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: datagrid.selectedIndex not correct in cellPress - flex2
On 2/8/06, bhaq1972 [EMAIL PROTECTED] wrote: If you run my test in flex 1.5 the result is different. the selectedIndex and event.itemIndex (aka rowIndex in flex2 beta) are the same, as long as your dg.selectable=true. i'm sure this is a bug in flex2 beta. In Flex 2.0, the cellPress event is dispatched before the selection is changed. If you want to do something after the selection is changed, you should do it in the change event. That works? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/