set value to children

hi guys

i have this code
if(pair.length == 2){
var status:String = pair[0];   //will show CEO
var [b]days[/b]:Object = pair[1];  //will show a number
}

Open in new window

                                          
now i want to set the days to listItem's children like this
listItems[i][0].data.children[0].children[0].children[0].[b]actualDays[/b]= [b]days[/b];

Open in new window

but actualDaysis not getting updated. Will the above line work?

thanks
royjaydAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dgofmanCommented:
The same problme you have to parse your data and split to the mutiple columns before you will pass to dataProvider

Example:

var array:Array = [{CEO:111}, {ENG:222}, {SALES:333}];

convert to

var array:Array = [{status:CEO, days:111}, {status:ENG, days:222}, {status:SALES, days:333}];

Now in your DataGrid you can create two columns status and days and data will come without any problems

0
royjaydAuthor Commented:
but why do i need Array
I just need to set the days  value from   var days:Object = pair[1];   to the actualDays  property
like this
listItems[i][0].data.children[0].children[0].children[0].actualDays= days; 

Open in new window


0
dgofmanCommented:
listItems[i][0].data.children[0].children[0].children[0].actualDays= days;??

How do you know listItems[i][0]. is not null

and listItems[i][0].data hase children

You don't want to introduce null errors in your application.

Open in new window


Is not good changing item elements without updating a dataProvider

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
royjaydAuthor Commented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Flex

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.