Is there a property like the Eventmanager of a Wingrid but for the UltraOptionSet? I want to be able to suspend the value changed event of the ultraoptionset while I am assigning the initial value to the ultraoptionset. The ultraoptionset does not have a datasource.
Lyle,
The only reason I suggested a local flag instead of managing the handlers is because if you remove the handler and re-add it, it may not receive the notification in the original order that it did; for example, if you had event handlers 1, 2, and 3 and you remove 2 and re-add it, it may be ordered as 1, 3, 2 in terms of who receives the notification first. Most of the time this shouldn't matter, and in fact you generally shouldn't be coding around the assumption of the order of event handlers, but I thought I'd throw it out there.
-Matt
Matt, Thank you for your suggestions. I had thought of using the local flag, but just seemed too crude. I am a bit embarrassed that I had not thought of using .NET RemoveHandler, AddHandler, that works just fine. Sorry to have taken up your time.
Lyle
I'm pretty sure that only the large controls/components (i.e. grid, toolbarsmanager, etc) have an EventManager property. In order to handle what you want to do, you should keep a local flag to prevent you from executing your logic in hte ValueChanged event and reset this flag when you are done with your intialization. Another option would be to remove the event handler, though I am partial to the first method.