Yes, I believe you can set editable to false – that’s what
I did, at least. The checkbox is still there as a renderer, and if you react on
its change event you can set the underlying datagrid data field to “true”
or “false” respectively. This should be remembered by the
ArrayCollection. BTW, this was not meant as a second alternative suggestion...it
was meant in combination with switching of the editable property. Am I making
sense ?
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Aaron West
Sent: Thursday, October 19, 2006
1:32 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] DataGrid
Weirdness with Online Example
iko, thanks for your
response. I can't set the editable="false" property on the grid
columns because then they won't report back selections / deselections to the
data provider (an ArrayCollection). Also, your second suggestion of manually
setting the "selected" property is already being done in my custom
AS3 renderer
in the overriden clickHandler() function.
| Aaron West
| aaron AT trajiklyhip DOT com
| http://www.trajiklyhip.com/blog/
| Certified Advanced Adobe ColdFusion MX 7 Developer
| Certified Macromedia FlashMX Developer
| Adobe Community Expert
On Oct 19, 2006, at 2:09 PM, Iko Knyphausen wrote:
Took a while to reproduce... which may trick you in believing
its all ok. Try editable=”false” and set the
selectedItem.field.selected property manually in a change event of the
checkbox. - Iko
/bigger>/bigger>
From:/x-tad-bigger>/fontfamily>
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] /x-tad-bigger>On Behalf Of /x-tad-bigger>Aaron
West
/x-tad-bigger>/fontfamily>Sent:/x-tad-bigger>/fontfamily>
Thursday, October 19, 2006 9:48 AM
/x-tad-bigger>/fontfamily>To:/x-tad-bigger>/fontfamily>
flexcoders@yahoogroups.com
/x-tad-bigger>/fontfamily>Subject:/x-tad-bigger>/fontfamily>
[flexcoders] DataGrid Weirdness with Online Example
/x-tad-bigger>/fontfamily>
/bigger>/bigger>
All,
/bigger>/bigger>
DataGrid's are cool, but yeash I've run into a lot of
problems with
/bigger>/bigger>them. I've put
/bigger>/bigger>together two *real simple* online
demonstrations that illustrate the
/bigger>/bigger>behavior I'm
/bigger>/bigger>seeing with a grid. I'd love for someone
more experienced to check out
/bigger>/bigger>these
/bigger>/bigger>two examples and offer any insight or
solution.
/bigger>/bigger>
http://www.trajiklyhip.com/flex/gridexample/DataGridExample1.html
/bigger>/bigger>/color>This is a simple grid that uses
a custom Checkbox item renderer written
/bigger>/bigger>in AS3.
/bigger>/bigger>Clicking the submit button will display
whether or not each Checkbox is
/bigger>/bigger>selected.
/bigger>/bigger>Make some changes to the boxes,
de-selecting a few or an entire column
/bigger>/bigger>and
/bigger>/bigger>then click the submit button to see the
selected value. The Alert box
/bigger>/bigger>usually
/bigger>/bigger>displays the right info the first time
through, but after you've gone
/bigger>/bigger>through a few
/bigger>/bigger>rounds of selecting and de-selecting some
of the boxes it will not show
/bigger>/bigger>you the
/bigger>/bigger>correct true/false value of each box.
/bigger>/bigger>
http://www.trajiklyhip..com/flex/gridexample/DataGridExample2.html
/bigger>/bigger>/color>This is another simple grid that
is the same as the previous one only
/bigger>/bigger>with more
/bigger>/bigger>rows of data to make the DataGrid scroll.
De-select the first "Group
/bigger>/bigger>Owner"
/bigger>/bigger>Checkbox (row 1 with the ID = 12) and
then click use the grid scroll
/bigger>/bigger>bar to scroll
/bigger>/bigger>up and down. As you scroll, other
Checkboxes are selected and
/bigger>/bigger>deselected at
/bigger>/bigger>random.
/bigger>/bigger>
Incidentally, if you right-click the DataGridExample1 movie
you can
/bigger>/bigger>view the source
/bigger>/bigger>to see what I'm doing.
/bigger>/bigger>
| Aaron West
/bigger>/bigger>| aaron AT trajiklyhip DOT com
/bigger>/bigger>| http://www.trajiklyhip.com/blog/
/color>/bigger>/bigger>| Certified Advanced Adobe
ColdFusion MX 7 Developer
/bigger>/bigger>| Certified Macromedia FlashMX Developer
/bigger>/bigger>| Adobe Community Expert
/bigger>/bigger>
/color>