This is just a general query about Data Binding.

I've got a Custom (VS 2003 generated) DataSet with a
number of strongly typed Custom DataTables within. I was
trying out using DataRelations to save me doing looping
compares in my code but I found that (obviouse in
retrospect) DataRow.GetChildRows() returns DataRow[]
which means i lose the strong typing of my rows (which i
*really* dont want to do).
Anyone come across this? Anyone any ideas about working
around it? Any future plans for the VS 2003 auto-
generated classes to provide helper functions, convertion
operators or custom dataset/row contructors that take
DataSet/Row as parameters.

Thanks in advance
Jan Bannister

Re: Losing strong typing when using DataRow.GetChildRows() by Miha

Miha
Fri Dec 05 05:03:22 CST 2003

Hi Jan,

What about masterRow.GetDetailRows() strongtyped method?
(Detail is detail table name)
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Jan Bannister" <bannistj@hotmail.com> wrote in message
news:0a1701c3bb1d$56a53860$a101280a@phx.gbl...
> This is just a general query about Data Binding.
>
> I've got a Custom (VS 2003 generated) DataSet with a
> number of strongly typed Custom DataTables within. I was
> trying out using DataRelations to save me doing looping
> compares in my code but I found that (obviouse in
> retrospect) DataRow.GetChildRows() returns DataRow[]
> which means i lose the strong typing of my rows (which i
> *really* dont want to do).
> Anyone come across this? Anyone any ideas about working
> around it? Any future plans for the VS 2003 auto-
> generated classes to provide helper functions, convertion
> operators or custom dataset/row contructors that take
> DataSet/Row as parameters.
>
> Thanks in advance
> Jan Bannister



Re: Losing strong typing when using DataRow.GetChildRows() by Jan

Jan
Fri Dec 05 06:13:38 CST 2003

Hey Miha,

Thanks for the heads up. I had a look for that function
and couldnt find it. I assume its put into the Custom
DataRow classes, is that right?
Do i need to have data relations in the .xsd file for VS
to auto generate the GetDetailRows() functions?

Thanks in advance
Jan



>-----Original Message-----
>Hi Jan,
>
>What about masterRow.GetDetailRows() strongtyped method?
>(Detail is detail table name)
>--
>Miha Markic - RightHand .NET consulting & software
development
>miha at rthand com
>
>"Jan Bannister" <bannistj@hotmail.com> wrote in message
>news:0a1701c3bb1d$56a53860$a101280a@phx.gbl...
>> This is just a general query about Data Binding.
>>
>> I've got a Custom (VS 2003 generated) DataSet with a
>> number of strongly typed Custom DataTables within. I
was
>> trying out using DataRelations to save me doing looping
>> compares in my code but I found that (obviouse in
>> retrospect) DataRow.GetChildRows() returns DataRow[]
>> which means i lose the strong typing of my rows (which
i
>> *really* dont want to do).
>> Anyone come across this? Anyone any ideas about working
>> around it? Any future plans for the VS 2003 auto-
>> generated classes to provide helper functions,
convertion
>> operators or custom dataset/row contructors that take
>> DataSet/Row as parameters.
>>
>> Thanks in advance
>> Jan Bannister
>
>
>.
>

Re: Losing strong typing when using DataRow.GetChildRows() by Miha

Miha
Fri Dec 05 06:33:07 CST 2003

Hi Jan,

"Jan Bannister" <bannistj@hotmail.com> wrote in message
news:0b2701c3bb29$3725c020$a401280a@phx.gbl...
> Hey Miha,
>
> Thanks for the heads up. I had a look for that function
> and couldnt find it. I assume its put into the Custom
> DataRow classes, is that right?

Right.

> Do i need to have data relations in the .xsd file for VS
> to auto generate the GetDetailRows() functions?

Yup. Based on relations in xsd it generates appropriate methods in dataset.

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