Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Link CustomerList BO to Customer in Parent Child Relatio
Message
 
To
08/03/2005 18:43:34
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00993854
Message ID:
00994284
Views:
18
>What I want to get done:
>I have a CustomerList business object that fills with the named value pair of CustomerId and CustomerName for all customers upon form creation and a Customer business object that would fill based on HookParentNavigated or HookParentRetrieved events.
>
>I have linked these in WinForm by registering the Customer as the Child of CustomerList
>In the Customer object I have implemented the Hook events by having them call GetCustomerByCustomerId(e.PrimaryKey).
>
>What I did is bind the CustomerList object to an UltraComboBox at the top of the form and I have Customer object fields displayed in the middle of the form. At the bottom I have navigation buttons (first, previous, next and last).
>
>When the form is loaded I am loading all Customer records into CustomerList and the the HookParentRetrieved event correctly gets the Customer data from the Customer object and displays values in the fields.
>
>What is not working:
>1. UltraComboBox is not showing the first record of the CustomerList (but does show all the records when the drop down is selected)

Have you set your CustomerList BindingValueSource, BindingValueSource and BindingValueSourceMember properties to the corresponding data in the Customer business object?

>2. When a new selection is made using the UltaComboBox no HookParentNavigated is raised - how should this be done?

The navigation events are normally fired by specifying a DataGrid as the form's Navigation control which raises the associated business object's Navigation events. When using a ComboBox you need to manually add code to the combo box's handler event (when a new item is selected) that calls the business object's NavigateData() method.

>3. The nav buttons call my CustomerList bus obj NavigateData.First (Prev, Next, Last) events but it does not seem like the HookParentNavigated is raised by these actions. How can I get this to work?

Hmmm...this should be firing in the child object if the parent object is navigating. I recommend setting a breakpoint in mmBusinessObject.StateChangeHandler() to see if the following code is getting fired:
case mmBusinessState.Navigated :
{
	this.HookParentNavigated(BusinessObject, e);
	goto default;
}
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform