I finally got around to testing your suggestion.
<mx:DataGridColumn editable="false" width="65" headerText="Member" textAlign="center">
<mx:itemRenderer>
<mx:Component>
<mx:HBox>
<mx:CheckBox selected="{data.member}" change="data.member=selected" />
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
.
The inline data.member works well but you have to switch "editable" property off, and update the listitem data manually via change event. Unfortunately, checkbox population fails the moment you wrap an HBOX around the checkbox. Works great without the HBOX.
Any ideas....?
--- In [email protected], "haravallabhan" <[EMAIL PROTECTED]> wrote:
>
> Iam just wondering How a Layout component has some affect on data?.
> It works for me.. selected = {data.ColumnDataField} shoue populate
> the value.
>
>
> --- In [email protected], "Iko Knyphausen" iko@ wrote:
> >
> > I tried that, and indeed it will help align the checkbox,
> unfortunately the
> > data binding stops working. In other words, the moment you have an
> hbox
> > around the checkbox, the checkbox does not show as "checked" in
> those rows
> > that have "true" as data value.
> >
> > Hi,
> > You can use HBox component or anoother layout compnent to say,
> inside
> > the itemRenderer like
> >
> > <mx:DataGridColumn width="65" headerText="Member" dataField="member"
> > textAlign="center" >
> > <mx:itemRenderer>
> > <mx:Component>
> > <HBox>
> > <mx:CheckBox labelPlacement="left"/>
> > </HBox>
> > </mx:Component>
> > </mx:itemRenderer>
> > </mx:DataGridColumn>
> >
> > thanks.
> >
> > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
> ups.com,
> > "iko_knyphausen" <iko@> wrote:
> > >
> > >
> > > Hi,
> > >
> > > I am trying to use checkboxes in my datagrid, and everything
> works
> > fine,
> > > except I cannot vertically align the "bugger". I played with
> > >
> > > textAlign=""
> > > horizontalCenter =""
> > > paddingLeft =""
> > > left=""
> > > etc.
> > >
> > > all the usual style candidates. The only thing that will make a
> > > difference, is the labelPlacement attrribute. The values "top" and
> > > "bottom" will center the checkbox nicely, unfortunately they will
> > also
> > > add space for the label (either above or below) even if the label
> > > attribute is empty.
> > >
> > > See code below. Help is greatly appreciated... Thx
> > >
> > > <mx:DataGridColumn width="65" headerText="Member"
> dataField="member"
> > > textAlign="center" >
> > > <mx:itemRenderer>
> > > <mx:Component>
> > > <mx:CheckBox labelPlacement="left"/>
> > > </mx:Component>
> > > </mx:itemRenderer>
> > > </mx:DataGridColumn>
> > >
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Software development tool | Software development | Software development services |
| Home design software | Software development company |
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___

