I have created two classes:
public class Params : List<Param>
{
}
public class Param
{
public enum enType
{
Integer,
Double,
String,
DateTime
}
private string sName_m;
public string Name
{
get { return sName_m; }
set { sName_m = value; }
}
private string sValue_m;
public string Value
{
get { return sValue_m; }
set { sValue_m = value; }
}
private enType eType_m;
public enType Type
{
get { return eType_m; }
set { eType_m = value; }
}
}
Now I want to be able to show the Params in a Grid type control on a windows application, so I dragged a DataGridView on to my form, and chose a datasouce by picking Other Data Sources -> Project Data Source, and then choosing my Params Class (frmMain+Params).
Now when I run the app, I can add/delete/edit records and the grid shows the three columns. What I'd like to be able to do is have the Type column be a drop down letting my pick values in the enumeration. Currently, I have to type a string that has to match the enumeration. Possible?