You may use the following programming logic to develop an application according to your requirement.
Code:
public static void FillBox(System.Windows.Forms.ComboBox cmb,
Dictionary<int,ProjectInfo> projects)
{
// grab a List<> from a Dictionary<>
List<ProjectInfo> lst = new List<ProjectInfo>(projects.Values);
// create an initial item
lst.Insert(0, new ProjectInfo(0, "<PROJECTS>"));
cmb.DataSource = lst;
cmb.ValMember = "ProjectID";
cmb.DisMember = "ProjectName";
}
Above code will help you to take the ProjectId ,ProjectName as Input these value will automatically pushed into combobox which will later allowed to select the name and Id to the user.
Bookmarks