ListView Problem


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 created a SF Maintenance form in VB. Added a BO and a List View and set up a SQL statement to receive data from a table. The list view populates but the maintenance tool bar does not become available. In other words all the buttons are not available. What should I do. I am brand new to SF so I am not sure how to approach finding a solution. TIA.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
The ListView is usually for displaying data, not editing (though I think you can do it...though a grid is way better). I guessing that you dropped the BO on the form, then setup the ListPopulating property of the list view. It sounds like you used the same BO type as that dropped on the form and set the appropriate fill property. It is important to understand that the BO used by the ListView isn't the instance that you dropped on the form (necessarily). The ListView will create a new instance of the BO and call the fill method and fill the list. The BO on the form is just sitting there, empty...hence no enabled buttons.



In order to get the navigation buttons to work, you'll need to fill the instance of the BO you dropped on the form. This is typically done in the ParentLoading event, which is easy to get to...just double click on the BO in the designer. Of course, you'll need to add some controls to show the data too. Once done, the toolbar will light up.



Note that the toolbar will have no effect on the list though. So clicking on a list item won't move the current record and navigating the BO with the toolbar won't change the item selected in the list.



Hope that helps!



Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I think I got the some of my property/event names a bit wrong...it is PopulationDataSourceSettings property and ParentFormLoading event.
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 think I have figured that out about the list view vs the grid. I now have switched to a grid and used the businessbindingsource. I now have the grid populated and I have put my own buttons on that allow me to navigate the grid. But of course now I want to put a child BO on the form (which I have done) and I believe it is configured correctly and some textboxes that I want to update with the child info when the record in the grid changes. I am not sure how to do that but maybe I can use some navigation method of the parent BO? Last statement is just my thought now. Any help would be appreciated. Thanks for your help because it at least makes me understand the listview better and that probably I needed some other control..... Thanks again.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yep, the ListView is generally on for displaying data while the Grid is used for editing data. 

In order to use a ChildBO on the form, you're most likely going to want to place the child BO on the form and fill it with all fo the records that belong to the parent business object (child.FillByParent() should help with that...).  Then, on the parent business object, set the ChildAutoFilterOption property to MatchCurrentRow... this will change the filter on the child business object to only show the records that match the selected record in the parent.  Then, just make sure that the parent business object is navigated to the correct row (the CurrencyManager within the BusinessBindingSource should take care of that, but some grids don't use the CurrencyManager the same way the basic .NET grid does) and the child business object will be filtered to show the child records.

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
Thanks to all of you. I got it working and along the way I feel I got to know Strataframe better. I also even got the messaging system to show values from the parent and the child just to see if I could. Again Thanks....
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Cool! BigGrin
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