The
private var CRDetailList:*Array* = new *ArrayCollection*();;
Array cant be instantiate by a ArrayCollection
if you use Array you have to "push" itens inside...
but i'm looking to you code and you are using "addItem" ////
so your variable is ArrayCollection type...
just try this:
private var CRDetailList:*ArrayCollection*;
private function onItemClick( e:ListEvent ):void {
CRDetailList = new ArrayCollection();
nameTxt.text =
e.itemRenderer.data.NAME<http://e.itemrenderer.data.name/>;
CRDetailList.addItem(e.itemRenderer.data.CR_NUMBER);
}
2010/4/8 Gaurav <[email protected]>
> What is wrong in below code –
>
> <mx:AdvancedDataGrid id="CRsGrid" dataProvider="{mydataprovider}"
> itemClick="onItemClick( event );">
> <mx:columns>
> <mx:AdvancedDataGridColumn id="name" headerText="Name"
> dataField="emp_name"/>
> ….
> …………….
>
> And then in Action script -
>
> private var CRDetailList:Array = new ArrayCollection();;
>
> private function onItemClick( e:ListEvent ):void {
> nameTxt.text = e.itemRenderer.data.NAME; //Line-1
> CRDetailList.addItem(e.itemRenderer.data.CR_NUMBER); //
> Line-2
> ...........
>
> Line-1 above is working fine but Line-2 is not working …any idea
> why ???
>
> --
> 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]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>
--
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.