Hi,
I am new to Flex development. I wanted to use the AdvancedDataGrid to
display data in a tree structure. coming from a remoteobject . The remote
object is a java Collections object. I could read this data and get into
Flex ArrayCollection. The data in the ArrayCollection contians complex data
structure, which cannot be displayed directly into AdvancedDataGrid. So i need
to create a seperate ArrayCollection object , which serves as the dataprovider
for AdvancedDataGrid. I am not able to create the ArrayCollection in the
format AdvancedDataGrid needed to display it in a tree structure. Does
anybody have any sample code to share ?.
I am not able to set the label field(eg : Region and children)
programatically , instead of creating it directly as shown below.
private var dpHierarchy:ArrayCollection = new ArrayCollection([
{Region:"Southwest", children: [
{Region:"Arizona", children: [
{Territory_Rep:"Barbara Jennings", Actual:38865,
Estimate:40000},
{Territory_Rep:"Dana Binn", Actual:29885,
Estimate:30000}]},
{Region:"Central California", children: [
{Territory_Rep:"Joe Smith", Actual:29134,
Estimate:30000}]},
{Region:"Nevada", children: [
{Territory_Rep:"Bethany Pittman", Actual:52888,
Estimate:45000}]},
{Region:"Northern California", children: [
{Territory_Rep:"Lauren Ipsum", Actual:38805,
Estimate:40000},
{Territory_Rep:"T.R. Smith", Actual:55498,
Estimate:40000}]},
{Region:"Southern California", children: [
{Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},
{Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}]}
]}
]);
Regards,
Santosh Varghese