Showing posts with label flex 3. Show all posts
Showing posts with label flex 3. Show all posts

Sunday, November 21, 2010

Nested AdvancedDataGrid

Flex them Grids! (AdvancedDataGrid as a subgrid with flat data)

A grid inside a grid is a common requirement; I thought. Yet, I scoured the internet for a solution and I couldn’t find it anywhere (…at least not something that could be done with “flat data”). The following is something I wanted to achieve.


Adobe LiveDocs show an example here http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7bf2.html where they put a chart in an itemrenderer. However they show this example with “Hierarchical” collection. Their data structure looks like:
   1: [Bindable]
   2:      private var dpHierarchy:ArrayCollection= new ArrayCollection([
   3:        {name:"Barbara Jennings", region: "Arizona", total:70, children:[  
   4:          {detail:[{amount:5},{amount:10},{amount:20},{amount:45}]}]},
   5:        {name:"Dana Binn", region: "Arizona", total:130,  children:[ 
   6:          {detail:[{amount:15},{amount:25},{amount:35},{amount:55}]}]},
   7:        {name:"Joe Smith", region: "California", total:229,  children:[ 
   8:          {detail:[{amount:26},{amount:32},{amount:73},{amount:123}]}]},
   9:        {name:"Alice Treu", region: "California", total:230, children:[ 
  10:          {detail:[{amount:159},{amount:235},{amount:135},{amount:155}]}
  11:        ]}
  12:      ]);      

However, this is almost never how one would get data from the server. We generally get a flat data-structure as ArrayCollection. The the trick would be to convert this flat structure into a Hierarchy of objects.

Saturday, July 31, 2010

Adobe Flex 3 Certified (...at last)

I have been procrastinating for a long time. Every time I set a date for the exam, something came up, (...as it usually does); I promptly procrastinated. Blame the laziness (a programmer's best virtue). In that regard I am quite up there (where programming is concerned, of course).

30th July '10 was the day my stars aligned; I walked into a PearsonVue testing center nearby and I committed myself to the dreaded 9A0-082.

Well, here's my testimony and advice:
The exam was not that hard contrary to what many claim. I finished it in about 25 minutes and had lots of time to review the flagged questions. If you've covered LiveDocs, that's more than sufficient; for practice, Attest worked. I found I either knew the answer or I didn't. I didn't spend too much time pondering over each question (there isn't much to ponder). Maybe a few seconds to understand the code in the options.

If anyone needs any guidance, feel free to write; I'll gladly help.