Databinding GrandChildren

Databinding GrandChildren

Old forum URL: forums.lhotka.net/forums/t/10509.aspx


JasonG posted on Saturday, July 09, 2011

Hello, I've been struggling with this problem for a few days, searching the internet and these forums for answers, but I couldn't find anything specific to my problem. At first I thought my problem was with saving grandchild objects, but I think the problem lies in correctly databinding grandchild objects. Here is the scenario..

Parent( BB)

---> ChildList(BLB) > Child(BB)

--> --> GrandChildList(BLB) > Grandchild

My parent winpart control accepts a Parent object and databinds to controls. The child object databinds to a datarepeater control. when the index of the child datarepeater changes I get the current child and bind the child.grandchildList to a second datarepeater. This all works well

I seemed to add and remove grandchild objects correctly, as they were added and removed from the datarepeated, but when i saved the parent the grandchild objects didn't save. Upon futher debuging i found that the newly added grandchild was not in the parent.child.grandchildlist. and the parent.childlist.indexOf() always returns a -1.

So in this scenario what is the correct way to interact with the grandchild objects?

thanks.

PS. I'm using CLSA 3.8.x and i've followed the ProjectTracker winpart control extactly.

 

 

Copyright (c) Marimer LLC