none
Creating a Master detail form with databound grid. Want to add a combo box column that lists items from a table that is not directly related to the Master and detail. RRS feed

  • Question

  • Using Linq to SQL to create a master/detail Order form with bound datagrid displaying detail items.  The detail lines contain items which can be sold or shipped in different unit of measure (eaches, cases, pallets, etc.).  Each item sold can have different units of measure than the orders (case = 6 eaches, case = 12 eaches, pallet = 20 cases, etc.)

    To model these relationships I've added a column to the Items table for a UnitOfMeasureSet which points to a UnitOfMeasureSet Table and its associated detail table UOMSetRelatedItems.  When an item is added to the OrderDetail Table, there is a field for the current UnitOfMeasure stored in the OrderDetail table.

    Tables are below.  The arrows indicate the relationships

    Order-->OrderDetail-->Item-->UnitOfMeasureSet-->UnitOfMeasureSetRelatedItems

    I can handle the order-orderdetail CRUD however the orderdetail table and can display the detail line current UnitOfMeasure but cannot change the column to a combo list displaying available units of measure from the Item tables related UnitOfMeasure.  I would like to have a combo column available to display the UnitsOfMeasure associated with the Items UnitOfMeasureSet and UnitofMeasureSetRelatedItems, but cannot think of a way to achieve this successfully using the current databound approach.

    I have tried all of the samples but none drill down this far from the original Order-->OrderDetail level relationship.

    I hope this is the correct forum for this question.  Please let me know if you need any further clarification.

     

     

     

     

    Saturday, July 10, 2010 3:10 AM