Hi All,

Before I dive in, I'd like to make not that this thread is sort of a
continuation on:

http://groups.yahoo.com/group/flexcoders/message/33238?l=1

I'm looking at binding some container widths to the widths of my
individual DataGrid columns.  I'm putting a drop down box above each
datagrid column which when changed, changes the content for that
column.  Hopefully you get the picture.

Anyway, I've come up against some difficulties in making the
containers that house my comboboxes the same width as the datagrid
column they represent.  I've tried the following:

1) Tried setting the width property on my container to
width="{myGrid.columns[X].width}" and of course I get the usual
warning that "Data binding will not be able to detect changes when
using square bracket operator.  For Array, please use
ArrayCollection.getItemAt() instead."  Fair enough... gues that won't
work.

2) Tried casting wrapping myGrid.columns in an ArrayCollection like so:
width="{DataGridColumn(ArrayCollection(grid.columns).getItemAt(1)).width}"
and I end up with a run-time error stating: "Type Coercion failed:
cannot convert [EMAIL PROTECTED] to mx.collections.ArrayCollection."  So
obviously ArrayCollection doesn't like the DataGridColumns that make
up my array.

So I've written a function to run on the columnStretch/resize event
for my datagrid which manually updates the widths of my containers
which house my comboboxes.  BUT... I'd rather get the binding to
work... any suggestions?

Thanks in advance,

Brendan





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to