I don’t think that is too much overhead.  Remember that the renderer has a reference to the item object itself, so updating a property value on a user click should not be a resource issue.

 

If you are still uncomfortable with that, you can probably find some other event to use that only fires when a user leaves the cell.

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of g8torjoe
Sent: Thursday, June 08, 2006 12:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I access the value in this datagrid?

 

Thanks Tracy,

Wouldn't the change event fire every time the arrows on the stepper
are clicked? In other words, if I have it default to zero, and they
increase it to 7 by using the arrow, that would be 7 times the change
event fires, and therefore 7 updates to the dataProvider? I think
that may work, but seems like a lot of overhead if my dataGrid has 100
records.

I debugged my app and changed the stepper on 3 lines to try and
isolate where all of the data is, but I can only find the data for the
selectedItem...which may mean the change event is the only option.

Am I making any sense with what I am attempting to accomplish?

Thanks!
Joe

--- In [EMAIL PROTECTED]ups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> In broad terms, since I have not done this myself, have your stepper's
> change event write the new value to the dataProvider. Then access the
> value from there using whatever logic necessary.
>
>
>
> Tracy
>
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On
> Behalf Of g8torjoe
> Sent: Thursday, June 08, 2006 11:36 AM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] How do I access the value in this datagrid?
>
>
>
> I have a datagrid pulling information from a SQL database. Each row
> in the grid has an itemEditor with a numericStepper. I want to write
> back to the database the values the user enters in that control. I
> just can't quite figure out how to reference the different rows.
>
> Code below, thanks in advance for your help!
>
> Joe
>
> <mx:DataGrid
> id="dgPart"
> dataProvider="{partList}"
> editable="true"
> width="100%">
> <mx:columns>
> <mx:Array>
> <mx:DataGridColumn
> id="partNum"
> headerText="Part #"
> dataField="PART_NO"
> editable="false"
> width="75" />
> <mx:DataGridColumn
> headerText="Part Name"
> dataField="PART_NAME"
> editable="false"
> width="350" />
> <mx:DataGridColumn
> id="qty"
> headerText="Quantity"
> editorDataField="value"
> width="75">
> <mx:itemEditor>
> <mx:Component>
> <mx:NumericStepper
> minimum="0"
> maximum="5" />
> </mx:Component>
> </mx:itemEditor>
> </mx:DataGridColumn>
> </mx:Array>
> </mx:columns>
> </mx:DataGrid>
>

__._,_.___

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