Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   How Can I retrieve Column/Schema Information From ObjectDataSource (http://www.velocityreviews.com/forums/t555962-how-can-i-retrieve-column-schema-information-from-objectdatasource.html)

Axel Dahmen 11-29-2007 10:00 AM

How Can I retrieve Column/Schema Information From ObjectDataSource
 
Hi,

I'd like to retrieve and step through an ObjectDataSource's columns to be
able to manually add BoundFields to a GridView control.

I don't know how to do this other than to manually call the
ObjectDataSource's Select() method. But this also retrieves all the data,
which I don't want to get at that time.

Your help is quite appreciated.

Regards,
Axel Dahmen



Bryan Porter 11-29-2007 02:02 PM

Re: How Can I retrieve Column/Schema Information From ObjectDataSource
 
Salutations Axel,

The actual schema isn't calculated until ObjectDataSource constructs the
ObjectDataSourceView for your object.

That doesn't happen until you call Select() on ODS.

--
Regards,

Bryan Porter
http://www.bryanporter.com/

"What A Horrible Night To Have A Curse!" - S. Belmont

"Axel Dahmen" <KeenToKnow@newsgroups.nospam> wrote in message
news:eLjEZ6mMIHA.5400@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I'd like to retrieve and step through an ObjectDataSource's columns to be
> able to manually add BoundFields to a GridView control.
>
> I don't know how to do this other than to manually call the
> ObjectDataSource's Select() method. But this also retrieves all the data,
> which I don't want to get at that time.
>
> Your help is quite appreciated.
>
> Regards,
> Axel Dahmen
>
>



Axel Dahmen 11-29-2007 03:20 PM

Re: How Can I retrieve Column/Schema Information From ObjectDataSo
 
Hi Bryan,

so there is no built-in way to just retrieve the schema information from a
DataSource control? So if I understand the mechanism right, the Select()
method will be called twice at every page cycle. I believe this might become
quite expensive from time to time...

I guess I will have to extend my Entity objects for a function to provide
the Schema manually then.

Appreciate your help!

Regards,
www.axeldahmen.de
Axel Dahmen

PS: Your link doesn't work. It always redirects to itself.



----------------
"Bryan Porter" wrote:

> Salutations Axel,
>
> The actual schema isn't calculated until ObjectDataSource constructs the
> ObjectDataSourceView for your object.
>
> That doesn't happen until you call Select() on ODS.
>
> --
> Regards,
>
> Bryan Porter
> http://www.bryanporter.com/
>
> "What A Horrible Night To Have A Curse!" - S. Belmont
>
> "Axel Dahmen" <KeenToKnow@newsgroups.nospam> wrote in message
> news:eLjEZ6mMIHA.5400@TK2MSFTNGP04.phx.gbl...
> > Hi,
> >
> > I'd like to retrieve and step through an ObjectDataSource's columns to be
> > able to manually add BoundFields to a GridView control.
> >
> > I don't know how to do this other than to manually call the
> > ObjectDataSource's Select() method. But this also retrieves all the data,
> > which I don't want to get at that time.
> >
> > Your help is quite appreciated.
> >
> > Regards,
> > Axel Dahmen
> >
> >

>



All times are GMT. The time now is 12:48 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.