Note that there are some explanatory texts on larger screens.

plurals
  1. PO2 lists, Use Drop down to select remaining values in 1 list
    primarykey
    data
    text
    <p>So in this page it will show a list of what current subContractors are working on this particular BOQ. This is stored in 'allSubContractors'</p> <p>This displays as a list on screen. I would then like to add a drop down box which allows the user to select any of the remaining subcontractors and add them to the list.</p> <p>so far iv got the first part working, where a list of current sub cotractors working on the BOQ display but for the drop down i've got exactly the opposite of what I want. The drop displays the same list of current Sub contractors, i want the remaining in the list.</p> <p>i'm using: </p> <pre><code>`List&lt;string&gt; allSubContractors = new List&lt;string&gt;(); ClarkeDBDataContext db = new ClarkeDBDataContext(); allSubContractors = (from BoqSUBContractors in db.BOQ_SubContractors where BoqSUBContractors.Bill_Of_Quantity_id == this.boqId select BoqSUBContractors.Sub_Contractor.Company_Name).ToList(); repeaterShowSubContractorName.DataSource = allSubContractors; repeaterShowSubContractorName.DataBind(); List&lt;Sub_Contractor&gt; availableSubContractors = new List&lt;Sub_Contractor&gt;(); ClarkeDBDataContext db1 = new ClarkeDBDataContext(); availableSubContractors = (from sc in db1.Sub_Contractors from bsc in db1.BOQ_SubContractors where sc.id == bsc.Sub_Contractor_id &amp;&amp; bsc.Bill_Of_Quantity_id == this.boqId select sc).ToList(); DropDownListSubContractors.DataSource = availableSubContractors; DropDownListSubContractors.DataBind(); </code></pre> <p>I was trying something like:</p> <pre><code> List&lt;Sub_Contractor&gt; availableSubContractors = new List&lt;Sub_Contractor&gt;(); availableSubContractors = (from sc in db.Sub_Contractors select sc.id).ToList() .Except(allSubContractors); </code></pre> <p>but noy joy, any advice? Thaks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload