public override void StateChangeHandler(OakLeaf.MM.Main.Business.mmBaseBusinessObject bizObj, OakLeaf.MM.Main.Business.mmBusinessStateChangeEventArgs e) { if (e == mmBusinessState.Added) { this.OnBindData(bizObj, e, false); } else { base.StateChangeHandler(bizObj, e) } }2. If you want to add the desired behavior to a single form, you can add a state change handler method to the form that binds the control when the business object's Added state change occurs. To do this, create a new method at the form level that checks the current state and if it's Added, binds the control. For example:
private void Orders_StateChange(mmBaseBusinessObject bizObj, mmBusinessStateChangeEventArgs e) { if (e.State == mmBusinessState.Added) { this.BindControl(this.cboShippers, this.cboShippers.BindingValueSource, this.cboShippers.BindingValueSourceMember); } }And then add code to the form's Load that registers the handler method with the business object's StateChange event. For example:
this.oOrder.StateChange += new mmBusinessStateChangeDelegate(this.Orders_StateChange);Regards,