How to get the parent of a deleted (child) row

G

Guest

Hello,

My question is quite straightforward:

How do I get the parent row of a deleted (child) row. If I use the method
"GetParentRow" of the child then it returns "nothing". I have tried using the
version parameter of the method but without any result.

I probably could use the original value of the deleted row to "manually" go
through the parent rows and find its parent but this seems like a lot of work
for something as simple as this.

Hoping for a quick answer,

WiZZiX
 
S

Sahil Malik

How about dropping down to XML for this? Then using the XMLDOM to find the
relevant row?

- Sahil Malik
http://www.dotnetjunkies.com/weblog/sahilmalik
Please reply to the newsgroups instead of email so everyone can benefit from
your reply.


Miha Markic said:
Hi,

I guess you are stuck with manual way.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

WiZZiX said:
Hello,

My question is quite straightforward:

How do I get the parent row of a deleted (child) row. If I use the method
"GetParentRow" of the child then it returns "nothing". I have tried using
the
version parameter of the method but without any result.

I probably could use the original value of the deleted row to "manually"
go
through the parent rows and find its parent but this seems like a lot of
work
for something as simple as this.

Hoping for a quick answer,

WiZZiX
 
M

Miha Markic [MVP C#]

Hi Sahil,

Isn't this a bit of an overkill? :)

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Sahil Malik said:
How about dropping down to XML for this? Then using the XMLDOM to find the
relevant row?

- Sahil Malik
http://www.dotnetjunkies.com/weblog/sahilmalik
Please reply to the newsgroups instead of email so everyone can benefit
from
your reply.


Miha Markic said:
Hi,

I guess you are stuck with manual way.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

WiZZiX said:
Hello,

My question is quite straightforward:

How do I get the parent row of a deleted (child) row. If I use the method
"GetParentRow" of the child then it returns "nothing". I have tried using
the
version parameter of the method but without any result.

I probably could use the original value of the deleted row to
"manually"
go
through the parent rows and find its parent but this seems like a lot
of
work
for something as simple as this.

Hoping for a quick answer,

WiZZiX
 
S

Sahil Malik

Yeah, it might be an overkill .. I was just trying to avoid the string
comparisons on the parent fields. XSLT performance in 2.0 is gonna go up by
400%, so I figured XMLizing your logic wouldn't be so bad.

- Sahil Malik
http://www.dotnetjunkies.com/weblog/sahilmalik
Please reply to the newsgroups instead of email so everyone can benefit from
your reply.


Miha Markic said:
Hi Sahil,

Isn't this a bit of an overkill? :)

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Sahil Malik said:
How about dropping down to XML for this? Then using the XMLDOM to find the
relevant row?

- Sahil Malik
http://www.dotnetjunkies.com/weblog/sahilmalik
Please reply to the newsgroups instead of email so everyone can benefit
from
your reply.


Miha Markic said:
Hi,

I guess you are stuck with manual way.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Hello,

My question is quite straightforward:

How do I get the parent row of a deleted (child) row. If I use the method
"GetParentRow" of the child then it returns "nothing". I have tried using
the
version parameter of the method but without any result.

I probably could use the original value of the deleted row to
"manually"
go
through the parent rows and find its parent but this seems like a lot
of
work
for something as simple as this.

Hoping for a quick answer,

WiZZiX
 
G

Guest

Hello both,

Thanks for all the replies.
My stubourness forced me to try getting the parent row again using the
datarowversion parameter of the GetParentRow method. Using original as the
parameter I now did seem to get the parent row and was able to modify it.

I just thought I should mention it althought I am surprised that you did not
correct me by saying it should work in the first place. Am I missing
something here.

Thanks again though,
WiZZiX


Miha Markic said:
Hi,

I guess you are stuck with manual way.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

WiZZiX said:
Hello,

My question is quite straightforward:

How do I get the parent row of a deleted (child) row. If I use the method
"GetParentRow" of the child then it returns "nothing". I have tried using
the
version parameter of the method but without any result.

I probably could use the original value of the deleted row to "manually"
go
through the parent rows and find its parent but this seems like a lot of
work
for something as simple as this.

Hoping for a quick answer,

WiZZiX
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top