I am trying to map the data present in the array to two datagridcolumns in a datagrid.I am calling a servlet to create a query and then form the xml file. The xml is sent to loadevent method in an actionscript file (dataholder.as) and the datagrid is present in the mxml file (calendar.mxml). Now I need to map two arrays (arrDueDate and arrNotes present in the dataholder.as) to two datagridcolumns (DataField = "Notes" and DataField = "DueDate") present in the Calendar.mxml file. Can anyone please tell me how this can be done? I am new in using flex. I know only a little bit about actionscript and the data handling in flex.
Thanks in advance..
DataGrids can only take one dataProvider, so you'll need to loop over the two arrays and create a third, but in this case use an ArrayCollection, as it is bindable.
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex / AIR Development, Training, and Support Services
Thanks for your reply. I actually tried with ArrayCollection. But that did't work. If you can give me an example, it would of great help An example where how an ArrayCollection present in an actionscript file (x.as) can be accessed in mxml file (y.mxml) using dataprovider.