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

Validation on unselected tabitems

1 Answer 73 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
peter
Top achievements
Rank 1
peter asked on 08 Nov 2012, 02:44 PM
Hi i have a raddataform, which contains tabitems, on the second tabitem i have some validation which is meant to take place. However the validation only appears in the validationsummary box if i click on the second tabitem. It never happens if i dont click on it. How do i go about getting it to validate the unselected tabitem. Thanks

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 13 Nov 2012, 03:00 PM
Hi Peter,

Let me make a quick clarification about our RadTabControl. By default the content of a RadTabItem is loaded when you select that item. And that content is cleared when you select other RadTabItem, in order to load the newly selected RadTabItem.Content. This is why you can only get the validation of the currently selected tab. However, you can set the x:Name properties and then traverse all the tabs and fill the Errors collection of the ValidationSummary control. For more information you can read this forum thread. Also you can find a similar behavior implemented in the attached project.

Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TabControl
Asked by
peter
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or