I have an Employee class. There are many departments maintained in the database and an employee may only belong to a particular department.
public class Employee
{
private string name;
private int depID;
public string Name
{
get { return name; }
set { name = value; }
}
public int DepartmentID
{
get { return depID; }
set { depID = value; }
}
}
public class Department
{
private int depID;
private string depName;
public int DepartmentID
{
get { return depID; }
}
public int DepartmentName
{
get { return depName; }
set { depName = value; }
}
}
How can I display the object Employee in the PropertyGrid with the department as a one of the properties that will be displayed as combobox?
Is it possible? Or is there any better implementation? Thanks in advance for your inputs.