Do you mean binding the details DataGrid to the DataRelation? The compiler
coughs that up. I've tried setting the DataSource property to
DataRelation.ChildTable, but that gives me the same result.
Also, when you 'binding', is this the same as setting the DataSource
property? I've tried that and I've also tried using
SetDataBinding(DataRelation, StringTableName) and SetDataBinding(DataSet,
StringTableName). The first one fails altogether ("Cannot produce a child
list for field <TableName>") while the second compiles and runs but produces
all of the child rows for the rows present in the parent table.
Thanks for any help.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uQ**************@TK2MSFTNGP10.phx.gbl...
Christopher,
Instead of binding the details table to the child table, bind it to the
relation itself, and it should do what you want.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Christopher Weaver" <we*****@nospamverizon.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...I have a DataSet with two tables and a DataRelation. When I populate the
DataSet and define a master detail relationship through the DataRelation,
the grid bound to the master table shows both the master and detail rows
while the grid bound to the detail table shows the detail rows for all of
the master table rows. I would like the grid bound to the detail table to
show the detail rows related to the each master row as the user moves
through the master rows. I know I could do this with a currency manager
and an event hander, but that doesn't seem right. Surely I'm overlooking
something fairly simple that makes this work.
Thanks.