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.
Eliyahu Goldin - 10 Aug 2007 07:46 GMT
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/archive/2006/12/27/how-to-get-datatable-out-of-s
qldatasource.aspx

Signature
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
> 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
[quoted text clipped - 7 lines]
>
> Thanks for any help or information.