When working with data-driven controls, you will almost always work with the dataprovider and not with the rendered display elements.  This is in part because the list based controls recycle the display elements when you scroll.  So you can’t loop through the rows of a dataGrid and read the value of the check box.  In fact if you have implemented this already, you may have noticed that the check boxes do not always hold their values when you scroll.

 

Instead, what you want to do is have your checkbox renderer undate a property on the dataProvider item when the user  changes the checked state  Then, when you are ready, you loop over the items in the dataProvider and read the value of the updated property.

 

Tracy

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of phillips1021
Sent: Tuesday, September 12, 2006 2:12 PM
To: [email protected]
Subject: [flexcoders] Process CheckBoxes Displayed Inside a DataGrid

 

Anyone know of a good tutorial or other resource for using checkboxes
in a datagrid that the user can then click on and then click on a
button below the datagrid. The button click will call a function that
should update the database for just the rows the user has clicked (ie
update the record for that row).

I've got the checkbox displaying on the datagrid, but I cannot figure
out the code for the function to process the rows that the user
checked. Is there some way to iterate over the datagrid and determine
if the row's check box was selected?

Bruce

__._,_.___

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

__,_._,___

Reply via email to