Hi Darwins,
It depends on how the database table is designed. Generally, many-to-many
relations are designed in three tables as the database in Roy's example. As
Roy said, there's no elegant way to bind the data directly. One solution is
provided by Roy. Or you can also join the "Courses" and "Registration"
table. However, this might cause some data redundancy.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| Content-Class: urn:content-classes:message
| From: "Darwin. S." <
[email protected]>
| Sender: "Darwin. S." <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: Re: Master-Detail using Default Views?
| Date: Tue, 4 Nov 2003 18:03:08 -0800
| Lines: 41
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOjQPWHHuz0F0imRjiCqw6ZkKWCIg==
| Newsgroups: microsoft.public.dotnet.framework.adonet
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:65433
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| Unless I'm missing something, that looks like a similar
| kind of work around that I have used. What I am hoping
| for is that is as straightforward of a solution as
| setting a normal master-detail. Surely, one would expect
| to be able to apply a filter to a dataset that is bound
| to a datagrid and still have the master-detail
| relationship work but so far that does not seem to be the
| case.
|
| Thanks,
| Darwin
|
|
| >-----Original Message-----
| >Yes there is. Look here (Lesson 4):
| >
http://weblogs.asp.net/rosherove/story/9088.aspx
| >---
| >Regards,
| >
| >Roy Osherove
| >
www.iserializable.com
| >
| >On Tue, 4 Nov 2003 16:21:03 -0800, "Darwin S."
| <
[email protected]>
| >wrote:
| >
| >>I asked this months ago and never got an answer and
| have
| >>had several people email me since then asking me if I
| had
| >>solved the problem. The only way I could do so was to
| >>not use the master-detail in the datagrids but to use
| >>DataViews and to set up a RowChanged event on the
| master
| >>grid and programmatically create filters for the detail
| >>grid. Is there no way for the master-detail
| relationship
| >>to apply when using the default views?
| >
| >.
| >
|