RE: [flexcoders] DataGrid Weirdness with Online Example
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 From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Aaron West Sent: Thursday, October 19, 2006 9:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid Weirdness with Online Example All, DataGrid's are cool, but yeash I've run into a lot of problems with them. I've put together two *real simple* online demonstrations that illustrate the behavior I'm seeing with a grid. I'd love for someone more experienced to check out these two examples and offer any insight or solution. http://www.trajiklyhip.com/flex/gridexample/DataGridExample1.html This is a simple grid that uses a custom Checkbox item renderer written in AS3. Clicking the submit button will display whether or not each Checkbox is selected. Make some changes to the boxes, de-selecting a few or an entire column and then click the submit button to see the selected value. The Alert box usually displays the right info the first time through, but after you've gone through a few rounds of selecting and de-selecting some of the boxes it will not show you the correct true/false value of each box. http://www.trajiklyhip.com/flex/gridexample/DataGridExample2.html This is another simple grid that is the same as the previous one only with more rows of data to make the DataGrid scroll. De-select the first Group Owner Checkbox (row 1 with the ID = 12) and then click use the grid scroll bar to scroll up and down. As you scroll, other Checkboxes are selected and deselected at random. Incidentally, if you right-click the DataGridExample1 movie you can view the source to see what I'm doing. | 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 __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional 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 __,_._,___
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 x-tad-biggerFrom:/x-tad-biggerx-tad-bigger flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] /x-tad-biggerx-tad-biggerOn Behalf Of /x-tad-biggerx-tad-biggerAaron West/x-tad-bigger x-tad-biggerSent:/x-tad-biggerx-tad-bigger Thursday, October 19, 2006 9:48 AM/x-tad-bigger x-tad-biggerTo:/x-tad-biggerx-tad-bigger flexcoders@yahoogroups.com/x-tad-bigger x-tad-biggerSubject:/x-tad-biggerx-tad-bigger [flexcoders] DataGrid Weirdness with Online Example/x-tad-bigger All, DataGrid's are cool, but yeash I've run into a lot of problems with them. I've put together two *real simple* online demonstrations that illustrate the behavior I'm seeing with a grid. I'd love for someone more experienced to check out these two examples and offer any insight or solution. http://www.trajiklyhip.com/flex/gridexample/DataGridExample1.html This is a simple grid that uses a custom Checkbox item renderer written in AS3. Clicking the submit button will display whether or not each Checkbox is selected. Make some changes to the boxes, de-selecting a few or an entire column and then click the submit button to see the selected value. The Alert box usually displays the right info the first time through, but after you've gone through a few rounds of selecting and de-selecting some of the boxes it will not show you the correct true/false value of each box. http://www.trajiklyhip..com/flex/gridexample/DataGridExample2.html This is another simple grid that is the same as the previous one only with more rows of data to make the DataGrid scroll. De-select the first Group Owner Checkbox (row 1 with the ID = 12) and then click use the grid scroll bar to scroll up and down. As you scroll, other Checkboxes are selected and deselected at random. Incidentally, if you right-click the DataGridExample1 movie you can view the source to see what I'm doing. | 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 __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: image.tiff> SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company x-tad-smaller Your email settings: Individual Email|Traditional/x-tad-smallerx-tad-smallerChange settings via the Web/x-tad-smallerx-tad-smaller (Yahoo! ID required) /x-tad-smallerx-tad-smaller Change settings via email: /x-tad-smallerx-tad-smallerSwitch delivery to Daily Digest/x-tad-smallerx-tad-smaller | /x-tad-smallerx-tad-smallerSwitch to Fully Featured/x-tad-smallerx-tad-smaller /x-tad-smallerx-tad-smaller Visit Your Group /x-tad-smallerx-tad-smaller /x-tad-smallerx-tad-smaller| /x-tad-smallerx-tad-smallerYahoo! Groups Terms of Use /x-tad-smallerx-tad-smaller /x-tad-smallerx-tad-smaller| /x-tad-smallerx-tad-smallerUnsubscribe /x-tad-smaller__,_._,___
RE: [flexcoders] DataGrid Weirdness with Online Example
Yes, I believe you can set editable to false thats 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 From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Aaron West Sent: Thursday, October 19, 2006 9:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid Weirdness with Online Example All, DataGrid's are cool, but yeash I've run into a lot of problems with them. I've put together two *real simple* online demonstrations that illustrate the behavior I'm seeing with a grid. I'd love for someone more experienced to check out these two examples and offer any insight or solution. http://www.trajiklyhip.com/flex/gridexample/DataGridExample1.html This is a simple grid that uses a custom Checkbox item renderer written in AS3. Clicking the submit button will display whether or not each Checkbox is selected. Make some changes to the boxes, de-selecting a few or an entire column and then click the submit button to see the selected value. The Alert box usually displays the right info the first time through, but after you've gone through a few rounds of selecting and de-selecting some of the boxes it will not show you the correct true/false value of each box. http://www.trajiklyhip..com/flex/gridexample/DataGridExample2.html This is another simple grid that is the same as the previous one only with more rows of data to make the DataGrid scroll. De-select the first Group Owner Checkbox (row 1 with the ID = 12) and then click use the grid scroll bar to scroll up and down. As you scroll, other Checkboxes are selected and deselected at random. Incidentally, if you right-click the DataGridExample1 movie you can view the source to see what I'm doing. | 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 __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional 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 __,_._,___