You do not need to call the server for each check.

 

You just need to update the LOCAL dataProvider item when the user clicks the check box.  Then when you are ready, loop through the dataProvider to extract the data to send to the server.

 

There are other ways.  When a checkbox is changed, update a local array or associative array with the data necessary to do the server update, probably some item key and the selected state.

 

But the easiest and most flexible is to update the dataProvider from within the itemRenderer.

 

Tracy

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of phillips1021
Sent: Thursday, September 14, 2006 4:39 PM
To: [email protected]
Subject: [flexcoders] Re: Process CheckBoxes Displayed Inside a DataGrid

 

Tracy:

Thanks for the response. I was afraid that was the case. I did
notice that the checks don't remain if you scroll. I'll have to come
up with a better way to do this. I wanted the user to be able to
check 30 items in a list of 100 and after checking the last item and
clicking on a submit button the database would be updated. I did not
want to have to call the CFC to update the database after each check.

Bruce

--- In [EMAIL PROTECTED]ups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> 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]ups.com [mailto:[EMAIL PROTECTED]ups.com] On
> Behalf Of phillips1021
> Sent: Tuesday, September 12, 2006 2:12 PM
> To: [EMAIL PROTECTED]ups.com
> 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