actually i need to change the selected index of that combobox from the command (cairngorm)........i have instance of the page
On Nov 17, 8:57 pm, "Venkat Viswanathan" <[EMAIL PROTECTED]> wrote: > Hi Rohit, > > There are two reasons why you should not access the combo box with a > reference like that: > > 1. When you place an element inside the itemRenderer, you will not know how > many instances will be created. It would depend on the number of rows in the > data provider. So it could be anything from 0 to infinity. So how will you > decide on the row from which the combo box needs to be accessed. > > 2. Even if you know the number of rows that will be there in the datagrid, > if you access the combobox from outside, you are defeating the concept of > itemRenderer. Basically an itemRenderer renders only those elements that are > required. If you try to access something that is present in the screen but > not visible, then you may get a null data exception. > > In short, you should not access the elements of your itemRenderer from > outside. There are crooked ways of doing this, but I wont recommend those > ways. Can you tell us why u want the combo box's reference? If you could > explain the complete functionality required, we may be able to help you with > a better approach. > > Regards, > Venkatwww.venkatv.com > > > > On Mon, Nov 17, 2008 at 7:38 PM, rohit <[EMAIL PROTECTED]> wrote: > > > I have a data grid and i add a combo box in that((using item rendrer) > > > <mx:DataGridColumn headerText="Mapped Account" width="200"> > > <mx:itemRenderer> > > <mx:Component> > > <mx:HBox width="100%" paddingLeft="5" height="30" > > verticalAlign="middle"> > > <mx:ComboBox id ="cmb1"/> > > </mx:Component> > > </mx:itemRenderer> > > </mx:DataGridColumn> > > > then ,how can i access that combo box outside the page by the id "cmb1"- > > Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

