M
Merk
I'm new to .NET (using 2.0) and was wondering how to go about binding a
collection of custom classes to a DataGrid.
The class exposes 5 read-only String properties. I would like for each of
these properties to appear in a column in the DataGrid.
The end result would be that when the collection has 35 objects in it, the
DataGrid would have 35 rows and 5 columns (after being bound to the
collection).
Specifically -
1. which collection class could/should I use (or do I need to roll my own to
make it "bindable")?
and/or
2. how do I make my objects in that collection "bindable" to the DataGrid?
Thanks.
collection of custom classes to a DataGrid.
The class exposes 5 read-only String properties. I would like for each of
these properties to appear in a column in the DataGrid.
The end result would be that when the collection has 35 objects in it, the
DataGrid would have 35 rows and 5 columns (after being bound to the
collection).
Specifically -
1. which collection class could/should I use (or do I need to roll my own to
make it "bindable")?
and/or
2. how do I make my objects in that collection "bindable" to the DataGrid?
Thanks.