Jack Jackson
4/21/2008 5:07:00 PM
On Mon, 21 Apr 2008 09:13:52 +0200, "Khan" <no@spam.me> wrote:
>Ha all.
>I have a my custom class with few strings. Then i have a List of
>my custom class. I' m adding data to list with "mylist.Add(mycustmclass)"
>I wnat to bind that list to a GridView but i get an exeption
>" The data source for GridView with id 'GridView1' did not have any
>properties or attributes from which to generate columns. Ensure that your
>data source has content."
>Where is the problem?
It sounds like your custom class doesn't have any Properties. Binding
works only with Properties, not Fields.
Also, you should use the generic BindingList for the list, as it has
more binding capability than List or ArrayList.