How Can I retrieve Column/Schema Information From ObjectDataSource

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
 
B

Bryan Porter

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
 
A

Axel Dahmen

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.



----------------
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top