if I was a user in this situation I'd get frustrated that the app was pulling out from under my feet the very control I was interacting with!. I suspect that the immediate problem is occurring because the drop-down list part is not a child of the form and hence not cleaned up by removeAllChildren(). Maybe you could see if a control is open in this way and either postpone the whole refresh (which I guess would not be desirable) or at least leave in place the child the user is actually interacting with and just do all the rest?
What if you remove the form itself? not the children of form.
If i have to solve the issue, I will go for re-instantiating same form for fresh data.
Thanks for all your replies. Sorry for this late reply.
I found out the problem. The problem is with the combo box control. Whether we remove the entire form and reintiate it the problem will be still seen.
The combox has a private property known as destroydropdown where it does the clean up of drop down. The if control will check for wheher drop down exists and is still open. so there the condition fails hence drop down was not getting cleared.
I found a work around for this, the drop down automatically closes for any event generated. So I manually dispatched a click event on form, so it closes the drop down and then later call removeallchildren. By doing this the if control in destroydropdown in combobox control will get passed and does the clean up. Hope this maight be helpful. Thanks for your time.