Re: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid
--- Chaitu Vadlapatla [EMAIL PROTECTED] wrote: Hi tracy, did you manage to find a way to do the dataChange fire off. Thanks Chaitu. Hi Chaitu Yes, I did manage to get the dataChange to work, but I did change the code slightly. The latest Flex documentation says that one should use ArrayCollections as a dataProviders for list-based controls, rather than Arrays, and one can catch the relevant events from there (read Flex Developer's Guide on flex.org) For my grids I did the following: - added a function to be called on the grid's creationComplete event: creationComplete=initDataChange(event) - in that function I added a collectionChange event listener: grid.addEventListener(collectionChange, collectionChangeHandler ) So when my ArrayCollection variable in the model changed, it would fire a collectionChange event, which would be captured by the DataGrid (since it was wired up to listen for it in the initDataChange function) and call the collectionChangeHandler(event) function. Hope this helps Regards Tracy Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/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/
RE: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid
Exactly how are you changing the data? Perhaps I'm blind. I don't see the grid as editable, nor do I see any function changing the data. Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11Sent: Monday, July 03, 2006 9:23 AMTo: flexcoders@yahoogroups.comSubject: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid Hi thereI am trying to capture the dataChange event in a datagrid, but myassociated method is not being called when I change data in the grid.Here is the code:mx:Script![CDATA[public function updateData() {trace("*** UPDATE DATA")tempArray = [{col1:"Jack", col2:"Col2 A"}, {col1:"Col2 A",col2:"Col2 B"},{col1:"Col3 A", col2:"Col3 B"}];}public function doDataChange() {trace("*** DATA CHANGEED")}[Bindable]public var tempArray:Array = [{col1:"Col1 A", col2:"Col2 A"},{col1:"Col2 A", col2:"Col2 B"},{col1:"Col3 A", col2:"Col3 B"}] ]]/mx:Scriptmx:Button click="updateData()" x="656" y="426" /mx:DataGrid id="dg" dataChange="doDataChange()" dataProvider="{tempArray}" x="656" y="447"mx:columns mx:DataGridColumn headerText="Col1" dataField="col1" /mx:DataGridColumn headerText="Col2" dataField="col2" / /mx:columns/mx:DataGridAny help much appreciatedCheersTracy --No virus found in this incoming message.Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006 __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___ -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006
Re: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid
--- In flexcoders@yahoogroups.com, Shannon Hicks [EMAIL PROTECTED] wrote: Exactly how are you changing the data? Hi Shannon The datagrid references a bindable variable, tempArray, as its dataProvider. There is a button that updates the tempArray value when clicked, which updates the data in the datagrid. Regards Tracy Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/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/
RE: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid
My bad... I was blind. You need to cast your dataprovider as an arrayCollection, not an array. Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11Sent: Monday, July 03, 2006 9:23 AMTo: flexcoders@yahoogroups.comSubject: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid Hi thereI am trying to capture the dataChange event in a datagrid, but myassociated method is not being called when I change data in the grid.Here is the code:mx:Script![CDATA[public function updateData() {trace("*** UPDATE DATA")tempArray = [{col1:"Jack", col2:"Col2 A"}, {col1:"Col2 A",col2:"Col2 B"},{col1:"Col3 A", col2:"Col3 B"}];}public function doDataChange() {trace("*** DATA CHANGEED")}[Bindable]public var tempArray:Array = [{col1:"Col1 A", col2:"Col2 A"},{col1:"Col2 A", col2:"Col2 B"},{col1:"Col3 A", col2:"Col3 B"}] ]]/mx:Scriptmx:Button click="updateData()" x="656" y="426" /mx:DataGrid id="dg" dataChange="doDataChange()" dataProvider="{tempArray}" x="656" y="447"mx:columns mx:DataGridColumn headerText="Col1" dataField="col1" /mx:DataGridColumn headerText="Col2" dataField="col2" / /mx:columns/mx:DataGridAny help much appreciatedCheersTracy --No virus found in this incoming message.Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006 __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___ -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006
Re: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid
--- In flexcoders@yahoogroups.com, Shannon Hicks [EMAIL PROTECTED] wrote: You need to cast your dataprovider as an arrayCollection, not an array. I updated the my array to an ArrayCollection type, but still no luck. The function doDataChange() is still not being called. public function updateData() { trace(*** UPDATE DATA) tempArray.source = [{col1:Jack, col2:Col2 A}, {col1:Col2 A, col2:Col2 B},{col1:Col3 A, col2:Col3 B}]; tempArray.addItem({col1:New 1, col2:New 2}) } [Bindable] public var tempArray:ArrayCollection = new ArrayCollection([{col1:Col1 A, col2:Col2 A}, {col1:Col2 A, col2:Col2 B},{col1:Col3 A, col2:Col3 B}]) Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/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/
RE: [Junk E-Mail - LOW] Re: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid
Looks like now you want to use the arrayCollection.collectionChange event to trap it. Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11Sent: Monday, July 03, 2006 9:54 AMTo: flexcoders@yahoogroups.comSubject: [Junk E-Mail - LOW] Re: [Junk E-Mail - LOW] [flexcoders] DataChange event in DataGrid --- In [EMAIL PROTECTED]ups.com, "Shannon Hicks" [EMAIL PROTECTED] wrote: You need to cast your dataprovider as an arrayCollection, not an array.I updated the my array to an ArrayCollection type, but still no luck.The function doDataChange() is still not being called.public function updateData() {trace("*** UPDATE DATA")tempArray.source = [{col1:"Jack", col2:"Col2 A"}, {col1:"Col2 A",col2:"Col2 B"},{col1:"Col3 A", col2:"Col3 B"}];tempArray.addItem({col1:"New 1", col2:"New 2"})}[Bindable]public var tempArray:ArrayCollection = newArrayCollection([{col1:"Col1 A", col2:"Col2 A"}, {col1:"Col2 A",col2:"Col2 B"},{col1:"Col3 A", col2:"Col3 B"}]) --No virus found in this incoming message.Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006 __._,_.___ -- 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 Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___ -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.8/380 - Release Date: 6/30/2006