Hi
I have a typed dataset with a Master table (tblPersons) and a Detail table
(tblRemarks).
I have a Winform which shows person data (master data)
I would like to have a datagrid showing the detail data.
So I try to bind the datagrid like this:
DataSource: MyDataSet
And try to set DataMember to: tblPersontblRemarks
But I get an error:

"Invalid Property Value:"
"DataBinding could not find a row in the list that is suitable for all
bindings"

And then when I press OK
I receive another error:
"Datasources of type System.DBNull are not supported.
Parameter name: Datasource"

If I rightclick on a dataadapter and select Preview Data... it works fine.


Best regards

Jan

Re: Master - Detail problem... by Miha

Miha
Fri Nov 21 09:39:59 CST 2003

Hi Jan,

Strange.
What does your DataTable tblPersontblRemarks looks like?
Does it have a boolean column?
Which VS.NET version are you using?

"Jan Nielsen" <ReplyInNewsgroup@tiscali.dk> wrote in message
news:uEUP4PEsDHA.3196@TK2MSFTNGP11.phx.gbl...
> Hi
> I have a typed dataset with a Master table (tblPersons) and a Detail table
> (tblRemarks).
> I have a Winform which shows person data (master data)
> I would like to have a datagrid showing the detail data.
> So I try to bind the datagrid like this:
> DataSource: MyDataSet
> And try to set DataMember to: tblPersontblRemarks
> But I get an error:
>
> "Invalid Property Value:"
> "DataBinding could not find a row in the list that is suitable for all
> bindings"
>
> And then when I press OK
> I receive another error:
> "Datasources of type System.DBNull are not supported.
> Parameter name: Datasource"
>
> If I rightclick on a dataadapter and select Preview Data... it works fine.

DataAdapter has nothing to do with this error..

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com



Re: Master - Detail problem... by Jan

Jan
Fri Nov 21 12:11:03 CST 2003

Hi Miha
Thanks for answering

tblPersontblRemarks is not a datatable but a one-many relation between the
tables tblperson and tblremarks. (One person - Many remarks)
No, there is no booleans in neither of the tables.
I am using
Microsoft Development Environment 2002 version 7.0.9466 and
Microsoft .Net framework 1.1 version 1.0.3705

Best regards

Jan




"Miha Markic" <miha at rthand com> skrev i en meddelelse
news:OHzj5WEsDHA.1196@TK2MSFTNGP12.phx.gbl...
> Hi Jan,
>
> Strange.
> What does your DataTable tblPersontblRemarks looks like?
> Does it have a boolean column?
> Which VS.NET version are you using?
>
> "Jan Nielsen" <ReplyInNewsgroup@tiscali.dk> wrote in message
> news:uEUP4PEsDHA.3196@TK2MSFTNGP11.phx.gbl...
> > Hi
> > I have a typed dataset with a Master table (tblPersons) and a Detail
table
> > (tblRemarks).
> > I have a Winform which shows person data (master data)
> > I would like to have a datagrid showing the detail data.
> > So I try to bind the datagrid like this:
> > DataSource: MyDataSet
> > And try to set DataMember to: tblPersontblRemarks
> > But I get an error:
> >
> > "Invalid Property Value:"
> > "DataBinding could not find a row in the list that is suitable for all
> > bindings"
> >
> > And then when I press OK
> > I receive another error:
> > "Datasources of type System.DBNull are not supported.
> > Parameter name: Datasource"
> >
> > If I rightclick on a dataadapter and select Preview Data... it works
fine.
>
> DataAdapter has nothing to do with this error..
>
> --
> Miha Markic - RightHand .NET consulting & software development
> miha at rthand com
>
>



Re: Master - Detail problem... by Jan

Jan
Fri Nov 21 14:08:53 CST 2003

Hi again Miha
to make it even more strange I tried to create another solution.
I made a completely new dataset with only the two datatables in question,
added a relation and added some controls on a form to test it and it worked
perfect.
But it still doesn't work in my original solution.

Jan
"Miha Markic" <miha at rthand com> skrev i en meddelelse
news:OHzj5WEsDHA.1196@TK2MSFTNGP12.phx.gbl...
> Hi Jan,
>
> Strange.
> What does your DataTable tblPersontblRemarks looks like?
> Does it have a boolean column?
> Which VS.NET version are you using?
>
> "Jan Nielsen" <ReplyInNewsgroup@tiscali.dk> wrote in message
> news:uEUP4PEsDHA.3196@TK2MSFTNGP11.phx.gbl...
> > Hi
> > I have a typed dataset with a Master table (tblPersons) and a Detail
table
> > (tblRemarks).
> > I have a Winform which shows person data (master data)
> > I would like to have a datagrid showing the detail data.
> > So I try to bind the datagrid like this:
> > DataSource: MyDataSet
> > And try to set DataMember to: tblPersontblRemarks
> > But I get an error:
> >
> > "Invalid Property Value:"
> > "DataBinding could not find a row in the list that is suitable for all
> > bindings"
> >
> > And then when I press OK
> > I receive another error:
> > "Datasources of type System.DBNull are not supported.
> > Parameter name: Datasource"
> >
> > If I rightclick on a dataadapter and select Preview Data... it works
fine.
>
> DataAdapter has nothing to do with this error..
>
> --
> Miha Markic - RightHand .NET consulting & software development
> miha at rthand com
>
>



Re: Master - Detail problem... by Jan

Jan
Fri Nov 21 14:16:16 CST 2003

To complete the mystery:
When I opened the .vb file and edited the code manually it worked with no
problems.
Me.DataGrid1.DataMember = "tblPerson.tblPersontblRemarks "

Well thanks for your time

I am puzzled, but happy it works

Jan




"Miha Markic" <miha at rthand com> skrev i en meddelelse
news:OHzj5WEsDHA.1196@TK2MSFTNGP12.phx.gbl...
> Hi Jan,
>
> Strange.
> What does your DataTable tblPersontblRemarks looks like?
> Does it have a boolean column?
> Which VS.NET version are you using?
>
> "Jan Nielsen" <ReplyInNewsgroup@tiscali.dk> wrote in message
> news:uEUP4PEsDHA.3196@TK2MSFTNGP11.phx.gbl...
> > Hi
> > I have a typed dataset with a Master table (tblPersons) and a Detail
table
> > (tblRemarks).
> > I have a Winform which shows person data (master data)
> > I would like to have a datagrid showing the detail data.
> > So I try to bind the datagrid like this:
> > DataSource: MyDataSet
> > And try to set DataMember to: tblPersontblRemarks
> > But I get an error:
> >
> > "Invalid Property Value:"
> > "DataBinding could not find a row in the list that is suitable for all
> > bindings"
> >
> > And then when I press OK
> > I receive another error:
> > "Datasources of type System.DBNull are not supported.
> > Parameter name: Datasource"
> >
> > If I rightclick on a dataadapter and select Preview Data... it works
fine.
>
> DataAdapter has nothing to do with this error..
>
> --
> Miha Markic - RightHand .NET consulting & software development
> miha at rthand com
>
>