I've found 2 possible solutions.
1.) temporarily change your stored procedure to select the columns you would like to see in the data table (what you see when you open the xsd file). Example: SELECT 0 as [CustomerID], 'some text' as [CustomerName] FROM Customer
Comment out the SQL that created the temporary table. Then you can configure the xsd file so that all the columns are being returned. Next update your SQL by uncommenting the code you commented out. You'll still get an error when trying to configure the xsd but you shouldn't need to reconfigure it. If you need to add more columns then follow the steps above again.
The typed dataset will work in your gridview.
2.) Use functions to create your tables and then join on them. Here's a small example for creating a table in a function:
Create FUNCTION dbo.GetMyTable (@CustomerID int)
/*
Return table
*/
RETURNS @MyTable table
([ID] [int],
[CustomerID [int],
[CustomerName] [int]
)
as
begin
insert into @MyTable
SELECT statement goes here
return
end
If you need more information email me @ jon@strollaway.com