Return to Snippet

Revision: 14718
at June 9, 2009 18:50 by rengber

Initial Code
Foo[] foos = new Foo[2]; 
DataGridView1.DataSource = foos; 

    //This works. 
    public class FooGood
        public string Bar { get; set; }
        public string Baz { get; set; }
    //This Doesn't
    public class FooBad
        public string Bar;
        public string Baz; 

Initial URL

Initial Description
Stupidly simple -- just one pitfall: class to be bound must have Get/Set methods for reflection to discover.   Which is annoying when it comes to client side classes auto generated from WSDL.

Initial Title
DataGridView DataBind an Array of Arbitrary Objects

Initial Tags

Initial Language