469,920 Members | 2,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

Getting Other Data from SQLDataSource ?

I have a GRIDVIEW I have bound to an OBJECTDATASOURCE that has the
select pointing to a class method that uses ADO to grab a dataset from
SQL Server Stored Procedure.

One of the columns that comes back I am not interested for the Grid,
But I would like the first ROW's value for a label.

I could do another IO to go get this, but Is there any way I can
extract this data from the DATASOURCE directly in the Codebehind?

Thanks for any help or information.

Aug 10 '07 #1
1 1530
Why are you using ObjectDataSource if the database is Sql Server?
SqlDataSource provides property DataSourceMode that can be used for getting
a DataTable object from the datasource.

Look here for details:

How to get DataTable out of SqlDataSource
http://msmvps.com/blogs/egoldin/arch...atasource.aspx

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"jobs" <jo**@webdos.comwrote in message
news:11**********************@i38g2000prf.googlegr oups.com...
I have a GRIDVIEW I have bound to an OBJECTDATASOURCE that has the
select pointing to a class method that uses ADO to grab a dataset from
SQL Server Stored Procedure.

One of the columns that comes back I am not interested for the Grid,
But I would like the first ROW's value for a label.

I could do another IO to go get this, but Is there any way I can
extract this data from the DATASOURCE directly in the Codebehind?

Thanks for any help or information.

Aug 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by abillmeier | last post: by
6 posts views Thread by Dabbler | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.