Parent-Son-Garndson Listview


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have a Parent,Son,Grandson which I am trying to display. The Parent is on a Miantemence Form and works fine. I have the Son and Grandson in two ListvIews , side by side. The Son is dispaying fine. When I land on each record of the Son, I want the Grandson records to show, just for the relevant son. Nothing is being displayed on the Grandson list. I have set up as follows: The Foreign  Key for the Grandson is got from the Primary Key on the Son

SonBo.Navigated... This.ListView2.Requery();    //to requery the Grandson ListView

Grandson.ListView.Populating...  e.Parameters[0].value  = this.SonBO["Son_PK"];  //to get Primary key from the Son

Grandson ListView.Properties... PopulateOnFormLoad=Manual  MethodToExecute=FillByParentPrimaryKey(Int32)  (primary key is Numeric)

What am I missing ?

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, with the infomration you have provided it is hard to tell what your code may be doing.  I see that you are calling the Fill method on the integer PK, but do you have the relationship setup on the BOs, etc.?  Here are some things to check:

  • Verify that the relationship is setup between the Child -> GrandChild
  • Make sure that the Navigated event of the Child is on the correct record when the Requery is called for the grandchild.
  • Make sure that you actually have records for the grandchild (I have done that before Smile)

Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Trent

Verify that the relationship is setup between the Child -> GrandChild ........ Yes That is set up on the GrandChild BO

Make sure that the Navigated event of the Child is on the correct record when the Requery is called for the grandchild............The child records are displaying in List 1. I am expecting ,as I arrow down through this list, that the Grandchildren will appear automatically  in List 2 (The Grandchild) ..... is there something else here perhaps I need to call ??

Make sure that you actually have records for the grandchild (I have done that before ).... Yes I have double checked that

I just have about 25 records on each table  as a test so I can see whats happening a bit clearly

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Gerard,

Make sure the instance of GrandsonBO.ParentBusinessObject in your form has the value of the SunBO.

Edhy Rijo

Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Edhy,

Just checked that , and the Instance of the GrandChild BO does have the parentBisinessObject set to the Son

(By the way . in you last post , you had two lines, not separated by a Blank Line... how do you do that..all my lines have a blank line in between)

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Gerard O Carroll (05/14/2009)
...Just checked that , and the Instance of the GrandChild BO does have the parentBisinessObjectset to the Son


Then you will either need to post a sample using the StrataFrame Sample database or start debugging the listview.populating method to see if you are getting the right Parent PK value.



(By the way . in you last post , you had two lines, not separated by a Blank Line... how do you do that..all my lines have a blank line in between)


Sure I use the "CodeSnippet" IFCode shortcuts (from the left of your browser)


Edhy Rijo

Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Edhy.

I will go back over the app with a fine tooth comb..just thought that mabe I was missing ... some piece of code somewhere..if I still have issues, i'll do up a smple on SF database and post it

Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Have gone back over the app...cannot see where I am going wrong. So I have set up another SamplE App using StRata Frame sample Sql Server Database....am still having the same problem trying to see the grandchildren....I know this must be something very simple that I cannot just see.. I am uploading two projects

SF_Samppl_App which has just 1 form (frmCust) (KEK_1.ZIP)

SF_SAMPLE_BO which is a BO Library with Cust,Orders and Order Lines BO set up. (KEK_2.ZIP)

I'd really apprEciate it if someone could have a look

Attachments
KEK_1.ZIP (95 views, 97.00 KB)
KEK_2.ZIP (103 views, 102.00 KB)
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Gerard,



Sorry I don't have time now to explain in detail, but I changed the logic of your sample (see attached projects). Look at the listviews population method and at the BOs Navigated events.



Your BO relation definitions are OK. You will see data from record 2.



Have a nice weekend! Tongue

Edhy Rijo

Attachments
KEK.zip (116 views, 203.00 KB)
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi Edhy, many thanks for taking the time to unzip the app and having a look at it.

I have downloaded your zip, unzipped it and it runs fine.

I'll need some time to have a look at it in detail

I see you are using a BusinessCloneDataType.. not sure what that does but I'll have a closer look and see if I can sort out my own app with the help of your download.

Many thanks again for taking the time to look at this. I am just at that learning point on the curve where I reckon if I can get some concrete results on the next few weeks I will have made a lot of progress

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search