Home All Groups Group Topic Archive Search About

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

Author
23 May 2006 5:12 AM
Spam Catcher
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.

Author
23 May 2006 5:58 PM
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).

...


Show quote
"Spam Catcher" <spamhoneypot@rogers.com> wrote in message
news:Xns97CCC49046CDusenethoneypotrogers@127.0.0.1...
> 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.

AddThis Social Bookmark Button