On Mon, Jan 12, 2009 at 7:45 PM, Manish Jethani <manish.jeth...@gmail.com>wrote:

> On Sun, Jan 11, 2009 at 3:51 AM, wesley.acheson
> <wesley.ache...@gmail.com> wrote:
>
> > I've a problem with the DataGrid ignoring the % width, while using
> > Canvas as the parent.  When I dynamically create columns it stretches
> > to beyond the origional area.  This behaviour has been reported as a
> > bug. http://bugs.adobe.com/jira/browse/SDK-14390.  The workarround
> > described in the bug setting the width to 0 works for me in a simple
> > test case but doesn't appear to work within my main application.
>
> [...]
>
> > I would like to extend datagrid with a version that doesn't have this
> > issue if I can figure out why a fixed width doesn't work.
>
> I've left a reply on the bug:
>
> http://bugs.adobe.com/jira/browse/SDK-14390
>
> Basically your DataGrid's minWidth is too large for the Panel. You can
> set the minWidth property to reduce it. By default the measured value
> for minWidth is always going to be large enough to accommodate all the
> columns.
>
> Manish
>

Okay sorry If I wasn't clear enough about it basically the data grid
stretches, but not enough to accomidate all columns. Nor even enough to fill
the container.  Setting a width of 0 makes the datagrid remember its
constraint layout.  Some other intresting factors in my test case if I leave
on column not dynamically created specified in the mxml, and replace it with
the dynamic columns then it works correctly.

The other point is that it still occurs even if horizontal scroll policy is
set to on.  (Which is actually the way I want it to work).  Again I got this
reply when I was at home so it will have to wait until tomorrow if I produce
a test case.

My test case was simply adding a data grid to an application and either
giving it a right constraint or a percentage width.  The I created a loop
and created an array of DataGridColumn headers.  Then I set this array as
the datagrid column array.

Anyway thanks for your time Manis.

Wesley

Reply via email to