This is a migrated thread and some comments may be shown as answers.

selectionchanged Event problem?

1 Answer 29 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Iron
Vincent asked on 19 Aug 2014, 04:05 PM
When I place a RadTabControl (B) in a RadTabControl (A). when I Switch the tabitem of B, the A's selectionchanged event fired.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 21 Aug 2014, 02:29 PM
Hi Vincent,

We investigated this behavior and it seems that the logic in the Selector class (which the RadTabControl inherits) that raises the SelectionChanged event listens if the tab control has an tab control parent. If so it fires the parent's event.

In order to change this behavior you can subscribe for the SelectionChanged event of the inner RadTabControl and handle the event.

private void RadTabControl_SelectionChanged(object sender, RadSelectionChangedEventArgs e)
{
    e.Handled = true;
}

I hope this helps.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
TabControl
Asked by
Vincent
Top achievements
Rank 1
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or