Object Data Sources - I don't get them...

G

Guest

Hi all,

I've finally had the opportunity to move to .NET 2.0 from 1.1.

From what I gather,they allow you to bind objects to controls.

However, in 1.1, collections of objects bound perfectly fine to datagrids,
dropdowns, etc. So what do you really gain by going with a Object Data
Source rather than directly binding a collection of objects to a control?

Any indepth articles about object data sources?

Thanks.
 
S

sloan

If you want to get the advances features of paging/sorting of a GridView,
you have to bind it to a ObjectDataSource (or sql data source).

What I do is ..

Create my custom Collection as normal. ( empCollection for example, with Emp
objects in it)
Bind the ObjectDatasource to the empCollection
Bind the GridView to the ObjectDataSource.


This is ~a way~ to do it, it is not the only way, its not the best way
sometimes.

But others can correct me if need be, I think the features of the gridview
are tied to the ObjectDatasource (or sqldatasource).

...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top