Archive for August, 2009
DataGridView binding to array of objects
by alowe on Aug.17, 2009, under Programming
When biding an array (or list) of objects of a defined class to a datagridview, you must define get and set methods, otherwise the datagridview cannot discover the members of the class via refection.
class myObject
{
public String string1 {get; set;}
public String string2 {get; set;}
}
Reference: http://snipplr.com/view/15786/datagridview-databind-an-array-of-arbitrary-objects/