It could be that enabling the grid caused the IEditableObject.Edit() method to be called which would raise the EditingStateChanged, but setting the Enabled to true when it's already true shouldn't cause it to be called again.
After my meeting with the client, I will try to track this one down and get back to you on what was going on. I meet with the client on Sep. 12th so you will hear from me after that. Until next week, I am under the gun
The help documentation has a list of events that exist on the business object and descriptions/examples of them. As for the form events, they're listed, too, but almost every one of them is a mirror event of the BusinessLayer class. The business object raises its event and the form follows suit. I don't think we have a diagram in the help documentation. There a diagram of the save process in the documentation for our training classes and it shows events, but that's about it.
Thanks for the explanation. I appreciate it. Is there anywhere that I can find detailed information about the Strataframe's event model?
Well all I know is what I observed
As for the second handler on the EditingStateChanged, I'm not sure why that one would cause an infinite loop. You're just enabling/disabling some UI elements, and not doing anything that would raise the EditingStateChanged again.
I suppose that the only time I need to worry about it is if I start giving myself the wrong answers
The infinite recursion stopped when I moved the code to the corresponding boAdvisor event handlers. I have no idea why fixed the problem. Can anyone enlighten me?
Thanks
Me again. I have a form that is using the Browse Dialog to locate records. This form also has a DataGridView that holds the contacts for the current Advisor. This Code works fine:
{
boAdvisorContacts.GetAdvisorContacts(boAdvisor.advisor_pk);
}
However, when these 2 methods are left uncommented, they put me into an infinite loop - any ideas about why this is happening? I have another form that uses similar code to update the child records in the grid and there are no problems with it - the only difference between the two forms is that the one that works does not use the Browse Dialog. Here are the methods that are causing the problems:
// if (!boAdvisor.IsEmpty)
// boAdvisorContacts.GetAdvisorContacts(boAdvisor.advisor_pk);
// {
// if (boAdvisor.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Idle)
// grdContacts.Enabled = false;
// else
// grdContacts.Enabled = true;
// }
TIA