1 Reply Latest reply on Apr 24, 2009 10:13 AM by Flex harUI

    Storing Data from One DataGrid & Passing it to Another.

    phillipus_rex Level 1

      This is probably a simple problem for some of you Flex veterans, but I'm having a rough time with it...

       

      I have a datagrid that looks like this:

       

                     <mx:DataGrid x="319" y="63" width="100%" height="100%" id="patient_stream" fontSize="11">
                          <mx:columns>
                              <mx:DataGridColumn id="category_head" width="50" headerText="PC #" dataField="pc"/>
                              <mx:DataGridColumn width="100" headerText="Category" dataField="category"/>
                              <mx:DataGridColumn width="75" headerText="# of Cases">
                                      <mx:itemRenderer>
                                          <mx:Component>
                                              <mx:TextInput/>
                                          </mx:Component>
                                      </mx:itemRenderer>
                                  </mx:DataGridColumn>
                              <mx:DataGridColumn width="800" headerText="PC Description" dataField="description"/>
                              
                          </mx:columns>
                      </mx:DataGrid>
      

       

       

      As you can see I have a TextInput component that is within an ItemRenderer.  I need to be able to collect any row of data that has numbers added to the TextInput field.  I then have a button that says "Add"  and this data is added to another datagrid that acts as a "summary" of the data being collected.

       

      Here is what that other "Summary" grid looks like:

       

       

      <mx:DataGrid x="10" y="538" width="100%" height="100%" id="stream_summary" textAlign="left">
                      <mx:columns>
                          <mx:DataGridColumn width="50" headerText="PC #"/>
                          <mx:DataGridColumn width="150" headerText="Category" />
                              <mx:DataGridColumn width="75" headerText="# of Cases">
                                  <mx:itemRenderer>
                                      <mx:Component>
                                          <mx:TextInput/>
                                      </mx:Component>
                                  </mx:itemRenderer>
                              </mx:DataGridColumn>
                          <mx:DataGridColumn width="800" headerText="Description" dataField="description"/>
                          
                      </mx:columns>
                  </mx:DataGrid>
      
      
      

       

      Can anyone provide any clues on how I could go about accomplishing this?

       

      Thanks.