Michael,
I have gone back and reviewed some of what I've done, and I went ahead and created the database connection...
protected void Page_Load(object sender, EventArgs e)
{
NorthwindDataContext Billing = new NorthwindDataContext();
var Invoices= Billing.CustOrdersOrders("Alfki");
InvoicesGrid.DataSource = Invoice;
InvoicesGrid.DataBind();
}
I have also successfully managed to do some VERY basic formatting with the ListView to get at least SOME of the information showing... So, at this point, I have made demonstratable progress.. .*chuckles* I think I was actually close to this point yesterday sometime and ended up going down a rabbit hole after something. Ah, the joys of a learning curve while programming.
The problem I'm running into is that I want to display information which has a parent child relationship... I need to show the header of the Customer Name off of the Invoice (the primary key of which is an integer PK) AND the Invoice ID as the header information (or group by if you will), and then I want to have the line items, which are in a child\detail table off of the invoice table (MasterTable = Invoice, detail table = InvoiceLineItems).
Now, I have reread the link that you sent (http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx) and I think either I have a misconception here or we're having a failure to communicate.
You say that I can bind a stored procedure to the LINQ datasource. If I'm understanding correctly, you do this by dropping a stored procedure onto one of the table objects in the designer. The example says, make your stored procedure simply select * from table name in order to make this functional. The problem is, that that's not what I want from my stored procedure... I want to have my stored procedure return specific data columns from two related tables (Master\detail) so that I can display things appropriately in my listview.
Now, I know how you can do the group by from the LINQ data source (using the key, count and IT as items), but, the problem as I see it is that your object model has to match your tables 100% and that if you have partial datasets from multiple tables coming back, then it's not going to be within the framework that is being forced by the LINQ structure...
I'm hoping there is a way around this, or that Microsoft is going to expand the LINQ DataSource functionality in the future... I found exactly one other example which was like mine in my google searching, and it ended with a guy from microsoft telling the original poster that if he had suggestions for future versions of LINQ, then go to a page and submit the request.... Basically, an admission that it won't do what this guy, and myself, need it to do...
What's really frustrating here is that its close... I can see my objective, but the road just doesn't seem to reach there yet... I'm going to keep looking for a work around, and Michael, I really do appreciate the time and your responses to my questions\problems... But, I've spent all afternoon with one of my mentors and co-workers and we keep coming up against the same roadblocks... Most of which seem to be ASP.net oriented, not DNN...
Oh well, we don't always manage to get things to work out the way we want them to when exploring new technologies... But, we keep looking...
Brian