I kind of see what you're getting at, I'm thinking the ArrayCollection
is probably not being returned as an associative array. I've
double-checked and the "col" variable is containing the value of what
I select in the comboBox yet value is not getting set equal to it so
yeah value = item[col] works. Going by your suggesting of checking the
field names, and all I had to do was make sure they matched and when
they did, the function as a whole worked. 

Thanks, once again a mundane detail ruins my day, lol. Oh well, all
part of the learning process.

--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> Hi Brian,
> 
> The original example uses an associative array; which is an instance of
> the Object class.  Because the example creates it's ArrayCollection in
> code, value = item[col] works:
> 
> dpRows = new ArrayCollection();
> var item:Object = new Object();
> item.type = "Website";
> item.name = "Expectal.com";
[EMAIL PROTECTED], "bredwards358" <bredwards358@>
> wrote:> item.url = "http://www.expectal.com";;
> item.desc = "Your Professional Flash Photo Gallery with Slideshow and
> Background Music";
> item.tags = "Flash, Gallery, Slideshow, Music";
> dpRows.addItem(item);
> 
> However, if you are loading your DataGrid's ArrayCollection from a
> database, it's probably not being returned in an associative array
> format.  If it is, check to make sure that the field names are exactly
> the same as the "data" values in the ComboBox ArrayCollection.  If it's
> not, you will probably have to re-write the code to be conditional.  You
> might also want to debug the "col" variable; to make sure that it
> contains a value.
> 
> As a general recommendation, I would pay attention to naming
> conventions.  Filters and Sorts are two distinctly different functions
> that may be applied to an ArrayCollection. 
> (model.prodMaintData.filterFunction = sortProducts is confusing).  Also,
> I would stay away from using the word "data" in name/value pairs.  It
> works, but it's very close to being a reserved word in Flex.
> 
> -TH

Reply via email to