Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Ultracombo Rowselected event firing at form dispose
posted

Hi,

I have a form having only one control i.e. ultracombo, i bound this to a bindingsource1 (display member- name, valuemember id) and set the databinding to some field of bindingsource2 (field stores id of name and its a transaction table)

I put a messagebox in the RowSelected event.

When I close the form through "X" , RowSelected event is fired and when I see the call stack , it is triggered from this method

Protected Overrides Sub Dispose(ByVal disposing As Boolean)

Try

If disposing AndAlso components IsNot Nothing Then

components.Dispose()

End If

Finally

MyBase.Dispose(disposing)

End Try

End Sub

 while "components.dispose" line is executing.

Why is this behavior?

In my real application , i have alot of code at rowselected event, which gets executed and throws exception. since this event is triggered during "components.dispose()" , not all the objects are available and if you refer them during this event , it will throw exception.

Is there any solution for this?

I can handle this issue by setting ultracombo.eventmanager.alleventsenabled=false , in dispose function before "components.dispose" line executed, but still want to know why is this behavior.

if I set ultracombo.eventmanager.alleventsenabled=false , is there any chance of memory leak? since all the events are disabled.

infragistics version is 7.1.20071.1055.

Thanks

 

Parents Reply Children