Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / October 2004

Tip: Looking for answers? Try searching our database.

MasterDetail Datagrid and Dataviews

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dfjhsqd - 11 Aug 2004 09:03 GMT
Hi all

I have a form with 2 datagrids (master-detail)
and a combobox to create a filter for the masterdatagrid.

The master-detail worked fine when i used a dataset like this :

drelRelation = New DataRelation _
("drelMasterDetail", dsMasterDetail.Tables("tblMaster").Columns("ID"), _
dsMasterDetail.Tables("tblDetail").Columns("MasterID"))
dsMasterDetail.Relations.Add(drelRelation)
dtgMaster.SetDataBinding(dsMasterDetail, "tblMaster")
dtgDetail.SetDataBinding(dsMasterDetail, "tblMaster.drelMasterDetail")

BUT now I wanna use the combobox for filtering, so I thought I could use the
DataView and the RowFilter-property

but then i can't get my master-detail part right?????
anyone any idea?
or is there a better way for this? I'm still a newbie

Thanx in Advance
Engineerik - 14 Oct 2004 16:13 GMT
dfjhsqd,

Did you find out how to do this?  I had the same setup and ran into the
exact same problem.

Regards,
Erik

> Hi all
>
[quoted text clipped - 18 lines]
>
> Thanx in Advance
Scave - 22 Oct 2004 01:20 GMT
Attach a handler to the combobox SelectedValueChanged event.
In this handler, filter the CurrencyManager's DataView according your
criteria.
Which DataView is that?
This one:
DataView myView = (DataView)myCurrencyManager.List;

I haven't used this particular technique in my code but it should work
roughly like that. Let me know how it goes.

> > Hi all
> >
[quoted text clipped - 18 lines]
> >
> > Thanx in Advance

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.