Hello Ben,
Thank you for reporting this issue. The problem seems to be on both sides -
When the OK button is clicked for some reason the content of the DataForm is recreated, i.e. the whole TabControl is recreated and new TabItems are added as well. The TabControl tries to focus the content it has just switched to. In this case when you put the IsSelected=True to the TabItem the TabControl will try to focus the content of that item. This happens in the wrong moment because it removes the focus from the button and the click never happens.
Here is part of the CallStack when this happens:
> Telerik.Windows.Controls.Navigation!Telerik.Windows.Controls.RadTabControl.
TryFocusContent() Line 2707 C#
Telerik.Windows.Controls.Navigation!Telerik.Windows.Controls.RadTabControl.
UpdateSelectedContent(int newIndex = 1) Line 2618 + 0x8 bytes C#
Telerik.Windows.Controls.Navigation!Telerik.Windows.Controls.RadTabControl.
OnSelectedIndexChanged(int oldIndex = -1, int newIndex = 1) Line 1533 + 0xb bytes C#
Telerik.Windows.Controls.Navigation!Telerik.Windows.Controls.RadTabControl.OnSelectedIndexChanged(System.Windows.DependencyObject sender = {Telerik.Windows.Controls.RadTabControl}, System.Windows.DependencyPropertyChangedEventArgs e = {System.Windows.DependencyPropertyChangedEventArgs}) Line 2186 + 0x69 bytes C#
Telerik.Windows.Controls!Telerik.Windows.PropertyMetadata.Create.AnonymousMethod(System.Windows.DependencyObject d = {Telerik.Windows.Controls.RadTabControl}, System.Windows.DependencyPropertyChangedEventArgs e = {System.Windows.DependencyPropertyChangedEventArgs}) Line 135 + 0x22 bytes C#
[External Code]
Telerik.Windows.Controls.Navigation!Telerik.Windows.Controls.RadTabControl.
SelectedIndex.set(int value = 1) Line 982 + 0x34 bytes C#
Telerik.Windows.Controls.Navigation!Telerik.Windows.Controls.RadTabControl.OnItemsChanged(System.Collections.Specialized.
NotifyCollectionChangedEventArgs e = {System.Collections.Specialized.NotifyCollectionChangedEventArgs}) Line 1688 + 0x42 bytes C#
[External Code]
There are two solutions to the problem - the DataForm stops recreating the contents on Click or we stop focusing the content automatically.
Certainly we need to do something about the focus because normally it is not an easy thing to deal with and there could be more problems in the future.
I will reply here when we decide how to proceed with this.
All the best,
Miroslav
the Telerik team