Gerard O Carroll (05/17/2009)
... 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 progressDon't worry, you will do just fine, we all have been in the same spot sometime.
The listview is my favorite control, it has been enhanced to do many thing automatically. Read the Listview topic in the "UI Layer -> Controls -> ListView" help file.
I have some free time now, so here is a quick description of how to populate it: The ListView and the ComboBox uses the same type of population, they both have an internal BO to host their items. When you use the Population Type Editor, you can select any method to be executed to fill the internal BO or you can use the BO.CopyDataFrom() method which requires you to have a BO dropped on the form to fill the internal ListView/ComboBox BO, this is the way I prefer to setup ListView since usually you may want to do something else with the data in the ListView and it is easier to manipulate the data in a BO dropped in the form.
Using the BO.CopyDataFrom(BusinessLayerBase, BusinessCloneDataType) method, requires 2 parameters. In the ListView.ListPopulating event you have to assign the values for those 2 parameters, I use VB.NET, but in you case it will look like this:
private void listView1_ListPopulating(MicroFour.StrataFrame.UI.ListPopulatingEventArgs e)
{
e.Parameters[0].Value = this.oR_BO1;
e.Parameters[1].Value = MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromDefaultView;
}
This way, when you call the ListView.Requery() it will copy the data from the BO assigned in Parameters[0] with the required BusinessCloseDataType that you use, in most cases "ClearAndFillFromDefaultView".
Also pay attention to the "StrataFrame: User Interface Automation" properties you can use, in your case for the "Transactions" listview I used the "BusinessObject" and the "AutoNavigateToSelectedRecord" properties, this will have the effect that when you select any record in the ListView it will move the record pointer in the BO "oR_BO1" and trigger the oR_BO1.Navigated() event which will then requery the "Transactions Details" listview which has been in the same way as the "Transaction" listview.
Hope this give you and others a clear view of how the ListView/ComboBox population works. Check the references in the help file and also take a look at the StrataFlix sample which make use of the ListView and ComboBox in its own way. Also keep in mind that this is just one way to populate these controls, SF provide us with a great flexibility on how to populate these controls which you will find out once you get more familiar with the framework.
Edhy Rijo