title: Populate comboboxes INSIDE a datagrid with UNIQUE data IN actionscript (flex)
body: <p>i've searched for several hours, and didn't find an answer for my problem.</p>
  
  <p>i'm trying to place comboboxes in a datagrid filled with DYNAMIC data. (the number and the content of these comboboxes always change. i don't know in advance how many columns there are, where i need to use comboboxes. so every single combobox gets a unique dataprovider, which comes from an external source, WHEN the program runs.)</p>
  
  <p>-i found MANY threads discussing this problem, but solving via crappy mxml files, filling the comboboxes inside the sourcecode by hand. i want to point out, that isn't good for me. </p>
  
  <p>-i found a better solution, in which they used some sort of custom itemrenderer to get the data from the internet. (kind of a country chooser thing) but sadly that wasn't good enough, because the number and name of the countries in the world are static more or less, they don't change. so their renderer class didn't depend on any parameters from the main algorithm.</p>
  
  <p>but in my program i calculate the data in my own actionscript objects, then fill an arraylist with that. so at the beginning i load the desired data from the net, and when i get the response of the urlrequest, AFTER that i start to populate the datagrid/combobox. </p>
  
  <p>i can fill any datagrid or combobox without trouble, but to put that combobox inside a datagrid cell seems to be impossible.</p>
  
  <p>could anyone please help? it drives me crazy. i managed to do this in several languages before, c#, java, even php+html, but in flex it looks way too complicated then it should be.</p>
  
  <p>EDIT:
  i'm aware, that this amount of network activity could mean some load on the server. i didn't design the philosophy behind it, i just need to wrote a client which meets the expectations. my program looks something like this: </p>
  
  <p>(i'm willing to rewrite any part of it, just to make those nasty comboboxes work)</p>
  
  <p>=========</p>
  
  <h1>main.mxml file</h1>
  
  <p>this is the main program, i handle some login related stuff here, and set basic design properties for the datagrids. (for example: maxwidth, maxheight, layout constraints etc.)
  nothing interesting, except the command when i instantiate the actionscript class, which i wrote to fill the datagrid. </p>
  
  <pre><code>"..&lt;fx:Script&gt;
      &lt;![CDATA[
          private var myGrid1:MyGridType;
          ..
          somefunction {
              myGrid1 = new MyGridType(theDatagridDefinedBefore, "argumentNeededToFillDataGridsWithUniqueData");
          }
      ]]&gt;
  &lt;/fx:Script&gt;.."
  </code></pre>
  
  <p>=========</p>
  
  <h1>MyGridType.as file</h1>
  
  <p>in the constructor i call a urlrequest with the help of the second argument, then add an eventlistener to it. when the data arrives, the eventlistener fires the filler function: i read the results into an arraycollection, then make it the dataprovider for the the datagrid in the first argument.</p>
  
  <p>so far so good.</p>
  
  <p>here comes the trouble with the comboboxes. for a specific number columns, i instantiate my combobox class. let's call that class "MyComboBoxType".</p>
  
  <pre><code>"..
  blablabla = new MyComboBoxType(theDatagridDefinedBefore, param1, param2, param3);"
  </code></pre>
  
  <p>=========</p>
  
  <h1>MyComboBoxType.as file</h1>
  
  <p>i do nearly exactly the same, what i did in the MyGridType class. call for help from the net with param1-2-3. when i receive the data, fill an arraycollection. maybe set that arraycollection to be the dataprovider for a combobox. AAAAAAAND now i want that arraycollection or combobox to be on the datagrid "theDatagridDefinedBefore".</p>