Flex :: Cannot Access ArrayCollection's Children In Datagrid

May 22, 2009

I've got a Flex 3 application with an HTTPService returning an Atom feed. I catch the result from it and store it in an arrayCollection which is then the provider of my Datagrid. I have no problem accessing the data from the "first-level" of my Array, but cannot go under it. Not very clear, so here is some code:

My XML [part of it]:

<entry>
<title>Test 2</title>
<id>http://collaboration.*****.com/collaboration/messaging/feeds/****/todo//7D6637D3E86B3ED3C12575B***8479</id>
<link rel="alternate" href="notes:///C12575B4004***8

[Code]....

The "title" column shows the data correctly, but the status column is empty ! When I launch my app in debug mode, I can see that my notesArray has the correct format and I can access todo -> status with the value..

View 3 Replies


Similar Posts:


XML :: Flex - ArrayCollection Children Returns Null

Aug 12, 2009

I have an ArrayCollection with following structure (when viewed in debug mode):
[0]
- [0]
-- src
- [1]
-- src
src is the path to an image.

I need to get all of the src's out of the arraycollection. However because of the first (unnamed) node I can't take them in. I've tried ArrayCollection[0].children and save the result in another ArrayCollection, however the new ArrayCollection has 2 Objects in it but no 'src'. There are just 2 null objects
firstArrayCollection is filled with the data as described above.
secondArrayCollection.addItem(firstArrayCollection[0].children);

When viewing the content of secondArrayCollection i see following structure (and data):
[0] null
[1] null

View 1 Replies

Flex :: Add Dynamic Children To An Array Or Arraycollection?

Dec 28, 2009

I'm a bit new to flex and cannot get my head around this problem.

I have a string list path.
path 1 - "one/two/three"
path 2 - "one/two/four"
path 3 - "five/six"

i need an advanced datagrid to show a tree structure like so

one/
...two/
........three/
............four
five/
.......six

but i want to achieve this dynamicall with arrays, objects, or arraycollection (as applicable).I need to loop through each string path using string methods which isnt a problem but how do i create "DYNAMIC" (depth) children?

View 2 Replies

Flex - Access Children Of Children Recursively?

Mar 10, 2010

I have a Canvas which has many components inside it and those again, have many components inside them.

getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on).

Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this?

View 3 Replies

Flex :: Object To Arraycollection Then To Datagrid?

May 13, 2011

linedataColl is an AC that contains 200+ of rows extract from CSV and in my design, I wish to additem into SuperDataCollection object by object but the only problem was I'm unable to see any data display in "S" which is a datagrid. What wrong with my code?

var superDataCollection:ArrayCollection = new ArrayCollection();
var dc:ArrayCollection = new ArrayCollection();
var di:Object = new Object();

[code].....

View 1 Replies

Flex :: Binding ArrayCollection Result To DataGrid

Jun 29, 2010

I am trying to bind an ArrayCollection result coming in from the server to my DataGrid
created dynamically in AS. The result data is not getting Displayed in the Grid.
var dg:DataGrid = new DataGrid();
dg.width=650;
dg.dataProvider=someArrayCollfromServer;

I am adding the dgColumn as runtime based on some data from a XML and it is the same as defined in below static format. But if I use the same code and create the DataGrid as a Flex Component as below, it works fine.
<mx:DataGrid id="dg" width="100%" height="100%" dataProvider="{someArrayCollfromServer}">
<mx:columns>
<mx:DataGridColumn dataField="Value" headerText="Value"/>
<mx:DataGridColumn dataField="Code" headerText="Code" />
</mx:columns>
</mx:DataGrid>

This works fine. Is there some functionality or implementation different as far as DataGrid is concerned in Flex and AS.

View 1 Replies

Flex :: Using An ArrayCollection To Populate Both A Datagrid And A ComboBox

Aug 11, 2010

I use this arrayCollection to populate a Flex 3 Datagrid. I'd also like to use this arrayCollection to populate a comboBox with the Name node.

In the arrayCollection, I've got the Name listed twice. I've got two rows in the Datagrid.

If I set the ComboBox's labelfield to Name, then the Name will be listed twice in the ComboBox menu. Is there a way to use this arrayCollection and have each Name listed only once in the comboBox?

I can always make another loop and array collection for the Name, but I was wondering if there were a better way.

var i:uint;
for (i=0; i<myArray.length; i++){
myDGArray = [

[Code]....

View 1 Replies

Xml :: Use ArrayCollection As A DataProvider For A XML File In Flex DataGrid?

Dec 10, 2011

I create a DataGrid to display a XML file and I have used XMLListCollection before. But when I modified the XML file, the DataGrid does NOT refresh itself automatically. I googled for this problem and found these links: refresh flex dataGrid

[Code]...

View 1 Replies

ActionScript 3.0 :: Flex - How To Use ArrayCollection From AmfPHP In DataGrid

Feb 26, 2010

I've setup my datagrid in flex 3 but, I dont know how to use the arraycollection from my database. How do I place it in my dataprovider?

View 11 Replies

Flex :: Datagrid - ItemRenderer Flex Values Getting Not Rendered According To ArrayCollection Provider?

Feb 4, 2011

i have a problem using the itemRenderer functionality. When using an ArrayCollection the visible Data in the DataGrid using the itemRenderer will be rendered just fine. But if i start scrolling the entries are repeating in the cells using the renderer. The cells are not filled with date according to the id. What mistake i'm doing here.

I read a lot of the explainations like:

[URL]

here is the code for the set data function (itemRenderer is extending HBox):

override public function set data(value:Object):void {
_data = value;
if(data!=null)

[code]....

View 1 Replies

Make Flex 3 Datagrid Show Only One Row Of An ArrayCollection's Results?

Aug 11, 2010

Is there a way to make a Flex 3 Datagrid show only the first node of an arrayCollection, instead of showing all of the arrayCollection's data?[code]...

View 3 Replies

Flex :: CheckBoxes In DataGrid Not Updating After Change In Binded ArrayCollection?

Jul 14, 2009

I have extended CheckBox class to use it as itemRenderer to centered it in DataGrid cell and reflect ArrayCollection changes. Here is the .as:

package myComponents
{
import flash.display.DisplayObject;

[code]......

View 2 Replies

ActionScript 3.0 :: Flex - Create A Dropdownlist That Populates A Datagrid - Loop Through ArrayCollection

Oct 14, 2011

I'm using FlashBuilder 4 and trying to create a dropdownlist that populates a datagrid. The functionality is fine but my data is being chopped up too much. Currently every since "nepName" tag in my XML file is showing up in my dropdownlist (which makes for many duplicates of the same names) and only shows the data associated with that nepName tag. I want each nepName (by name ex. Barnegat Bay National Estuary Program) to display only once in my dropdownlist and populate my datadgrid with ALL the data in the XML file that is associated with that name

[Code]...

View 1 Replies

Flex :: Adobe Flash Builder DataGrid DataProvider CollectionEvent.COLLECTION_CHANGE Handler's Access To DataGrid??

Feb 14, 2010

I've added an eventListener to the COLLECTION_CHANGE event that is fired when the grid is finished resorting the items in its dataProvider, after the user clicks on a column header:MyType (myDataGrid.dataProvider).addEventListener(CollectionEvent.COLLECTION_CHANGE,onDataGridResort);

View 1 Replies

Flex :: Access Data Of A ComboBox With An ArrayCollection DataProvider?

Nov 10, 2009

[code]...

Here am getting array of groups(groupName,GroupID each row ) from a RemoteObject and displaying in a ComboBox. I am selecting the groups with selectedIndex as 0,1,2,3, but I want my groupIDs of correspoding groupnames,which am bringing to client side.

How can I get actual the groupId of the selected group?

View 1 Replies

Flex :: Access Children Elements In A SWC?

Feb 17, 2010

Does anyone know if its possible to access children elements in a SWC? I have created some MC's and inside of some of these MC's I have some dynamic textFields. I export the content to a SWC and load it into my Flex project. No problem loading it or accessing the parent elements, they display fine. But I want to access the textfields nestes in the MC's and modify the text. When I debug the app, I can see the textfields as child elements. It's typed as a TextField and the Instance Name is the same as input in the Flash IDE but I cannot access it. When Flex compiles it throws an error saying it doesn't recognize the method. I've tried to insert actionscript on the timeline, linked external classes and nothing can be accessed.

View 3 Replies

Flex :: Object To Arraycollection - Unable To See Any Data Display In "S" Which Is A Datagrid?

May 14, 2011

linedataColl is an AC that contains 100+ of rows extract from CSV, I wish to add item into SuperDataCollection object by object but the only problem was I'm unable to see any data display in "S" which is a datagrid. What wrong with my code?

var superDataCollection:ArrayCollection = new ArrayCollection();
var dc:ArrayCollection = new ArrayCollection();
var di:Object = new Object();[code]......

View 1 Replies

ActionScript 3.0 :: [CS4] Children Inside Children - 1119: Access Of Possibly Undefined Property NumChildren

Jan 12, 2011

I have a Sprite called pageContent. Inside pageContent are 12 more Sprites with unique names, a couple of Buttons, and some TextFields. Inside each of the 12 Sprites I have either one or two TextFields and one TextInput. My question is, since they are children inside a child of pageContent, how can I access them? Here is how I am trying to do it:

[Code]...

In my mind, this should totally work. But surprise, surprise, it doesn't. I have debugged it and it works fine for the first two lines, but when it tries to get numChildren of a Child of pageContent (line 3), I get this error: PHP Code: 1119: Access of possibly undefined property numChildren through a reference with static type flash.display:DisplayObject.

View 4 Replies

Flex :: Access Children Nodes By Attributes?

Sep 8, 2011

I am trying to create an image gallery :

<card>
<product catalog="Thread Works">
<name>AK E001</name>

[Code]....

I can access the attribute, but if i am selecting "Thread Works" i want only access <product catalog="Thread Works"> with children node , for additem to array collection

View 3 Replies

Flex :: Mxml - Components Bound To Empty ArrayCollection At Load Time Don't Render As Expected When The ArrayCollection Is Updated?

Oct 27, 2009

I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>

[code].....

View 2 Replies

Flex :: How To Access Column For Particular Row In DataGrid

Apr 8, 2011

I am stuck in a problem working on Flex datagrid, in an AIR application. How can I access a specific row in datagrid in Flex. I am not talking about the selectedItem or any particular record of dataProvider of datagrid. What exactly I want to do is I am showing some files data (name, description etc.) on a datagrid, and the data of these files comes from an array which is the dataProvider of the datagrid. Now when these files are being uploaded one by one to the server (using a webservice), I want to show a ProgressBar on, say, "Progress" column in the datagrid. How can I access this column for a particular row in datagrid i.e. current file being uploaded.

View 2 Replies

Actionscript 3 :: DataGrid With ArrayCollection As DataProvider?

Nov 11, 2011

I have a Datagrid with an ArrayCollection as DataProvider, the arrayCollection is partially generated by a remoteObject call, the dataprovider seems to works at least until I try to edit the field...By the RemoteObject I only receive an ArrayCollection with the field ip, but the datagrid looks for the fields ip, check and save...If I add/edit this new field it works, but only under particular condition

The DataGrid:

<s:DataGrid id="datagrid" left="10" right="10" top="136"
dataProvider="{listaIPCheck}" bottom="10" requestedRowCount="4">
<s:columns>[code].....

This code always work in the 3 points, so at the end of the call the ArrayCollection is always filled with the new values, but the datagrid refresh the items only in point #1 and #2.

View 1 Replies

Flex :: Access The Datagrid In One Mxml In Another Component?

Oct 9, 2009

I have a datagrid in my mxml file, say, samp.mxml.

<mx:DataGrid id="taskDataGrid" dataProvider="{initDG}" variableRowHeight="true"
editable="true" width="100%" paddingBottom="1" paddingTop="1" height="55" >
<mx:columns>

[code].....

View 3 Replies

Flex :: Access Linkbutton Outsid Datagrid?

May 13, 2011

I am using this [code]...

How can I access lnkCaseId outside the datagrid?

View 1 Replies

Actionscript 3 :: Create The Step ArrayCollection For The Datagrid?

Sep 24, 2009

I am working with google map api ... http:[url]..What i want to do is to take up all the steps of direction, and place them in a datagrid.but the problem that the google map api provide description on in HTML format. and then i put this steps data in my flex datagrid, it shows up all the html tags in it too, including with the data.Can there be some way i can do this, without the html tags.My code for the google maps look like this :

private function processTurnByTurn():void {
var stepText:String;
var stepMarker:Marker;[code]....

This is the function to create the step ArrayCollection for the datagrid and the datagrid code looks like this:

<mx:DataGrid width="100%" height="100%"
dataProvider="{StepArray}">
<mx:columns>[code].....

View 3 Replies

Php :: How To Access ArrayCollection Data

Jun 24, 2010

I know this one might be easy but I couldn't figure out.I have a List control that retrieve multiply data from Mysql. When a use clicks the data on List, The datagrid will display the data and the product image will show.I can see the multiply data shown in my dataGrid, but I don't know how to get the individual data shown.

<s:List id="compList"
width="250"
height="350"

[code]........

View 1 Replies

Android - Use FlexGlobals To Access ArrayCollection?

Aug 30, 2011

I am currently trying to use the new approach of using FlexGlobals to access an ArrayCollection that I have on the Default view of a mobile application I am developing. Below is the code that makes up the creation and population of that array on the Default view which happens as soon as the app is initiated:

private var ids:ArrayCollection = new ArrayCollection();
private function loop():void
{
var index:int;

[Code].....

I could only assume that the ArrayCollection I had created in my default view has no value once I navigate away from it. this as there seems to be next to no documentation on how to do these types of things with FlexGlobals?

View 3 Replies

Actionscript :: Add Children To Accordion Children In Flex 4?

Oct 28, 2011

I have an ArrayCollection that is read to generate containers in an accordion programmatically:

<s:ArrayCollection id="_ac_ps">
<fx:Object label="Block and lot" data="_blocklot" searchType="districtblocklot"
info="" />

[code].......

View 1 Replies

ActionScript 3.0 :: Can'#t Access Children?

Feb 1, 2010

I have a simple class to create some buttons:

Code:
package {
import flash.display.*;[code]....

brings up "access of possibly undefined property" I do have other mcs etc within that container which don't have a ref but also trace (this.container.getChildAt(5).ref) doesn't work and I know number 5 is one of the ones that does have a ref.How do I use the ref to target the buttons.

View 2 Replies

ActionScript 3.0 :: Children Access From An External Swf?

Jul 25, 2011

I'm trying to access the childrens from an external swf previous loaded. This swf is a movieclip exported as swf which has two movieclips inside also.It loads the movieclip, but when I try to access to his childs, there is no one. What I'm doing wrong? I'm missing something when I export or load in AS3? I'm loading the swf as:
 
itemLoader = new Loader();
itemLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, itemLoaded);
 itemLoader.load(new URLRequest("path"));[code].....

View 13 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved