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


begin 666 smile.gif
M1TE&.#EA#P`/`-4``/?7`//3`.W-`.K*`./#`.#!`-Z^`-BY`-.T`-&R`-"Q
M`,VN`,&C`,:G`,6F`,# P+R>`+F;`+:8`+67`+&3`*V/`*R.`*J-`*F,`**%
M`*6'`*""`)^"`)U_`)E\`)1W`))U`)!T`(UQ`(YQ`(EL`(EM`(AK`(5H`()F
M`+^_OP``````````````````````````````````````````````````````
M`````````````````````````````````"'Y! $```\`+ `````/``\```:4
MP(=0J"H6A\A'T7!0-"!'I&H@&! ."X8$HQI.`X# P)!P1"R<KE(`* H*B&)E
MTU49!H'B.%%$@XH'!%166%H8'2%%"@<&!4Q.$!0:'B)%#0L)" D+3Q,7'!\E
M11 ,*@T.#! 3%ADJ(R=U$A$J$1(4%ZTA)FHJ&!851D4A)"AJ2AP;'!T>'R,F
/Q4E%("$B);#&T<%)00`[
`
end

RE: MasterDetail Datagrid and Dataviews by Engineerik

Engineerik
Thu Oct 14 10:13:20 CDT 2004

dfjhsqd,

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

Regards,
Erik

"dfjhsqd" wrote:

> 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
>
>
>

Re: MasterDetail Datagrid and Dataviews by ScaveMail

ScaveMail
Thu Oct 21 19:20:35 CDT 2004

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.


> "dfjhsqd" wrote:
>
> > 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
> >
> >
> >