N
Neil Steventon
Hi ,
I have started developing a database application , I say start as at this rate I see no finish.
I have a windows form which is bound to mydataset table "Companys" and this works great binding the text boxes etc such as ;
txtCompanyTelNo.DataBindings.Add("Text", myDataSet, "Companys.CompanyTelNo")
I then want a datagrid to display a list of contacts for the company, which would be easy if it was a 1:m relationship, but a contact can belong to many company's. It would therefore make sense to have an interim table of compcontacts which has the primary keys of the the company table and contact table together.
I have then set up the relationships but now when I databound I am finid it difficult to show the contacts info in the datagrid as it shows the iterim table instead ? I want to use a datagrid as it is easy for the user and also easier for me when updating the data tables.
I have found some examples on the web where people have tried to get around this but it would not allow you to update the datagrid as the solutions seem to be calculated columns.
examples solutions ;
http://weblogs.asp.net/rosherove/articles/9088.aspx
http://msdn.microsoft.com/library/d...atingMultipleRelatedTablesInADONETDataset.asp
Please can anyone help.
Thanks
Neil
I have started developing a database application , I say start as at this rate I see no finish.
I have a windows form which is bound to mydataset table "Companys" and this works great binding the text boxes etc such as ;
txtCompanyTelNo.DataBindings.Add("Text", myDataSet, "Companys.CompanyTelNo")
I then want a datagrid to display a list of contacts for the company, which would be easy if it was a 1:m relationship, but a contact can belong to many company's. It would therefore make sense to have an interim table of compcontacts which has the primary keys of the the company table and contact table together.
I have then set up the relationships but now when I databound I am finid it difficult to show the contacts info in the datagrid as it shows the iterim table instead ? I want to use a datagrid as it is easy for the user and also easier for me when updating the data tables.
I have found some examples on the web where people have tried to get around this but it would not allow you to update the datagrid as the solutions seem to be calculated columns.
examples solutions ;
http://weblogs.asp.net/rosherove/articles/9088.aspx
http://msdn.microsoft.com/library/d...atingMultipleRelatedTablesInADONETDataset.asp
Please can anyone help.
Thanks
Neil