Hi,
I am having a problem figuring out how to fit an assignment table into the selected values of my DropDownList. Normally when I am using lookup tables I can set the selected value(single select) easily. Here we have a one to one as shown below and it works fine as the corresponding model for the header table has one value in a column that is used to select the value from the list(from a lookup table "changeTypeList"). See below
Model:
public SelectList changeTypeList = new SelectList((from a in entity.luChange_Type select a.Change_Type_Desc).ToList());
EditorTemplate:
@model DatabaseRepositoryTool.Models.DB_Changes_Header
........
@Html.DropDownListFor(m => m.Change_Type_Desc, Model.changeTypeList)
Now I have to add a release MutliSelect DropDownList in the editor template for adding and modifying records. I need to populate it much in the same way I did above, using a lookup table of all possible values. Once I have populated it I need to use an assignment table to figure out which ones need to be selected as well as saved.
Schema:
The assignment table holds rows for each release assignment, given to a header record, and has a foreign key "Release_Name" as a key to the lookup tables primary key. It also stores the header table record's ID to link it to the header table.
Problem:
How do I go about populating the editor template with a MultiSelect DropDownList that is populated by a lookup table while setting the selected values based on the assignment table? I am using the pop-up editor in a Kendo grid and made a custom editor template for it.
I have no code to show as I cannot find any examples of how to do this.