When one has a Gridview and two datatables and one wishes to get the parent row and bind it to a gridview, how would this be done?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I seemed to resolve the issue. One can cast the datasource to the typed dataset and bind the linq object to the column. A sample solution follows:
On can then resolve the reference through the dataset using Server tags:
Please note that in the solution the Namespace that the project and aspx file exists in is TestingPlatForm. The Gridview datasource is then Cast to the typed Dataset type and we traverse the row that is being bound by the gridview through the linq extensions for the relations.
I hope this solution is of use to others who may still be using ADO.NET.