F
Flare
Hi
Im having a problem with the DataKeyField and a array of a custom class.
I have eg. this class
class employee
{
public int ID
{ get / set }
public String Name
{ get / set }
}
I can do this
Employee emp[] = FACTORY.GetEmployees();
datagrid1.DataSource = emp; // OK
datagrid1.DataKeyField = "ID";
The error is:
Value cannot be null. Parameter name: container.
What am I doing wrong and how do I solve it. The employee class is en
reality an autogenerated O/R mapping class.
Thanks in regards
Anders
Im having a problem with the DataKeyField and a array of a custom class.
I have eg. this class
class employee
{
public int ID
{ get / set }
public String Name
{ get / set }
}
I can do this
Employee emp[] = FACTORY.GetEmployees();
datagrid1.DataSource = emp; // OK
datagrid1.DataKeyField = "ID";
The error is:
Value cannot be null. Parameter name: container.
What am I doing wrong and how do I solve it. The employee class is en
reality an autogenerated O/R mapping class.
Thanks in regards
Anders