How Can I retrieve Column/Schema Information From ObjectDataSource

  • Thread starter Thread starter Axel Dahmen
  • Start date Start date
A

Axel Dahmen

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
 
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
 
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.



----------------
 
Back
Top