ListView Shows No Data


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I am just trying to show data from a child BO in a list view. I must not have the setting correct because I get no data to show. The BeginningListView photo shows the simple form I am using. The button just has a break point behind it so I could use the DataView Visualizer to see if my Parent(Customers) Child(Orders) relationship is working. When I look at the me.OrdersBO1.CurrentView it does show the correct records for the child so I think that is set up correctly.

I have also went into the ListView properties and set the Columns Collection to one column called colPrimary as the image shows. I set the PopulationDataSource to OrdersBo and the Method to FillByParentPrimaryKey(Int32), display fields to {0} or_pk, columns to formattedString and {0} and finally tag field to or_pk.

When I run the form I get what is shown in the SimpleListView image. What am I missing? It maybe that I have a parent child defined and then I am using the Fillbyparentprimarykey method but I am not sure.

TIA.

Attachments
BeginningListView.png (134 views, 22.00 KB)
SimpleListView.png (118 views, 28.00 KB)
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
On the Navigated event of the Customers BO instance, call the ListView.Requery() method to reload the list.  This is most likely the piece that you are missing.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I put the statement listview1.requery() in the OrdersBO1.navigated and I moved to record shown on the OriginalForm image. I also sent an image of what the ordersbo1.currentview looks like at that time. The listview is still not populated? TIA.
Attachments
currentview.png (111 views, 7.00 KB)
OriginalForm.png (103 views, 37.00 KB)
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Just to check the basics first, did you handle the ListPopulating event of the ListView and set the parent primary key?
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
That was it. I was not using the PK of the parent BO. Yea Gads how simple. Thank you so very much. I guess I thought since I was telling it to fillbyparentprimarykey(int32) that was all I had to do. Thanks again.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad that fixed it. I've done this more than a couple of times myself. Pinch
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