2 Replies Latest reply on Feb 25, 2010 7:29 AM by Daniel Pride

    Datagrid master/detail view - coding event handler

    Jim Gibson sbswa.com Level 1

      I created a simple app with two datagrids, representing database Table A (master) and Table B (detail) which have a one-to-many relationship. In FB4 I auto-generated code to populate the datagrids by dragging web service read methods over them. I then added a change event handler for the master datagrid, to update the detail datagrid. But in the event handler I don't know how to reference the master's currently selected record's ID column value.

       

      I assume I have to associate an ArrayCollection with the last result from the web service, and use this.masterdg.selectedIndex as an index into the ArrayCollection row containing the ID that I need.


      Can someone point me to an example (or book) where this kind of master/detail view binding is implemented, where the dataProvider is a web service wrapper, i.e. dataProvider="{readMasterInfoRecordsResult.lastResult}"?  I mainly need to see how the dataProvider data is maintained and referenced in the ArrayCollection (if I'm on the right track here).  Thx

       

      Jim