I have a GridView that I would like to bind to an ObjectDataSource. I have a ReadOnlyCollection of business objects that have many properties. I only to need to display four of these properties in the GridView. I haven't used the ObjectDataSource control before, so how can I use it to display 4 properties of all of the business objects in my ReadOnlyCollection?
C# – ObjectDataSource and Collection of Objects
asp.netc#-3.0objectdatasource
Best Answer
Say you had a list of objects with two properties: Name & Age:
Same thing you would do if you were data binding against any source and didn't want every value of each row of data.