Tracy - Not sure if you are referring to my sample code. But, just in case you are... That code *does* update the underlying data provider. It simply does it generically using ICollectionView and IViewCursor. This is not looping over the renderers afaik. If it is, I'd sure like to know... cuz I wouldn't recommend doing that either :)
Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com Tracy Spratt wrote: > Yes that example in that other reply will show you how to do this, but I > want to make a key idea very clear. > > > > When working with data, one never (almost) "loops over the DataGrid". > One always works with the underlying dataProvider. This is because Flex > only creates the visible rows. When you scroll, or change the data, the > data from the underlying dataProvider item is assigned to the > itemRenderer, and the renderer must use that data to update its UI. > > > > In your case, the itemRender must set the CheckBox.selected property > from a value in the dataProvider item. > > > > Google "Harui itemRenderer" to find a full discussion and many examples. > > > > Tracy > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of p_repetti > Sent: Friday, March 21, 2008 7:16 AM > To: [email protected] > Subject: [flexcoders] Select all checkboxes in datagrid with a single > click > > > > > Hello > > I have created a DataGrid component whose last column is rendered/edited > with a checkbox. This checks whether the row data will be sent to the > server > or not. > Rather than forcing the user to check all of the rows manually, I have a > "Select All" button which commands the selection of all the checkboxes > in > that column. > My problem is that I can't write the code to implement the selection. It > is > AS code most likely, but I could not find an example going through > docs/forums/whatever. > How do I loop over the DataGridColumn object to get the CheckBox > instances ? > > Can anyone point me to useful examples/references ? > > Thanks >

