In flex 1.5 you will have to do that on "change" event in cellRenderer:
 
MyCellRenderer.mxml
<mx:HBox>
   <mx:Script>
   <![CDATA[
        function updateDP()
       {
               //loop through the dataProvider for DataGrid and setValues.
              parentDocument.MyDataGrid.executeBinding();      //this may not be required, this will re-render the DataGrid
       }
   ]]>
 </mx:Script>
 <mx:TextInput id="MyTI"  change="updateDP()"/>
</mx:HBox>
 

--- In flexcoders@yahoogroups.com, "Jonathan Miranda" <[EMAIL PROTECTED]> wrote:
>
> Your easiest bet for this is to have a cellRenderer send an event out
> when you leave the cell and update the dataprovider accordingly in a
> function which will update the datagrid. If you're unlucky like me, I
> had to have selectable=false and it was giving me a headache trying to
> figure this out (knowing which row I was on) - but I got the final
> answer after a long list of emails.
>
> Things to note first about this:
> -my cell renderer had to have
> implements="mx.controls.listclasses.IDropInListItemRenderer" because I
> need access to listdata
> -you can't get to selectedIndices or anything of the like if your
> selectable=false, so that's why I had to use the vPosition
> -the idea is you bubble an event out from the cell you're editing, find
> out what row it is (and column in your case) and change the
> dataprovider.
>
> Here's the code for finding the row: (resultsDG is my datagrid, the
> stuff inside the brackets is the row position and compare is my column)
>
> resultsDG.dataProvider[e.target.parent.listData.owner.vPosition+e.target
> .parent.listData.rowIndex-1].compare
>
>
>
> Try tackling the extension of the cellrenderer to get the listData and
> if you got questions I can provide more examples.
> _________________________________________
>
> Jonathan Miranda
>
> Flexible Master of the Web
>
> "Try not to become a man of success, but a man of value." - Albert
> Einstein
>
> HealthGrades <http://www.healthgrades.com/> : Guiding America to Better
> Healthcare(tm)
>
> NASDAQ: HGRD
>
> w (720) 963-3832
>
> c (707) 761-0868
>
> [EMAIL PROTECTED]
>
> _________________________________________
>
> The message contains confidential and/or legally privileged information
> and is intended for use only by the indicated addressee. If you are not
> the named addressee you should not disseminate, distribute, or copy this
> e-mail. Please notify the sender immediately by e-mail if you have
> received this e-mail by mistake and delete this e-mail from your system.
> E-mail transmissions cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed,arrive late
> or incomplete, or contain viruses. The sender therefore does not accept
> liability for any errors or omissions in the contents of this message
> which arise as a result of e-mail transmission. If verification is
> required please request a hard-copy version.
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Sreejith Unnikrishnan
> Sent: Tuesday, March 14, 2006 11:39 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] [Flex 1.5] Update ColumnData with new data
>
>
>
> Hi,
>
>
>
> Need some help here.
>
>
>
> Assume I have an editable datagrid with 10 columns and 10 rows, all
> cells initially populated with a value 0.
>
>
>
> When I enter a value, say 10 in the first column and tab out, I need to
> update all the succeeding columns with the value 10. And then if I say
> edit the 3rd column with a different value, the succeeding columns
> should update with the new value.
>
>
>
> What would be the most efficient way to achieve this?
>
>
>
> Maybe I should try to generically find the "newValue" of a cell and then
> assign it by rowIndex-columnIndex?
>
>
>
> Thanks
>
> Sree
>
>
>
> --
> 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
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac
> tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>
>
> Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
> actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>
>
> Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> Web+site+design+development&w2=Computer+software+development&w3=Software
> +design+and+development&w4=Macromedia+flex&w5=Software+development+best+
> practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> development&w2=Computer+software+development&w3=Software+design+and+deve
> lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=OO6nPIrz7_EpZI36cYzBjw>
>
> Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&
> w1=Web+site+design+development&w2=Computer+software+development&w3=Softw
> are+design+and+development&w4=Macromedia+flex&w5=Software+development+be
> st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>
>
>
>
>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>
>
>
> * Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>
>
>
> ________________________________
>


--
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




Reply via email to