Winforms, VS2008

Hi,

I have a mainform that has 2 usercontrols: UC1 and UC2.

UC1 has a treeview with treenodes. UC2 has tabControl with few tabPages. Selecting different nodes displays different details view in the TabControl's TabPages.

What I need is canceling the event when the user has selected a node in the treeview, then he selects another node (i want to be able to cancel this last event:selecting another node, all depending on a certain logic)

I mean: When the user is working on a tabpage in the tabControl, when he clicks on a different node in treeview (different from the currently selected node), before displaying the new node's details in the TabControl, I perform some logic, then depending on that logic, I set

e.cancel = true in the UC2 Validating event handler. (Rememebr UC2 includes the TabControl and the user, supposedly, has the focus on a control somewhere in TabControl)

But mysteriously, the event gets never canceled and the user still moves to the next node, displaying its details in the TabControl, although I set e.cancel = true.

Any idea, how I can solve this mystery please?

Thanks a lot.