Validation on unselected tabitems

2 posts, 0 answers
  1. peter
    peter avatar
    37 posts
    Member since:
    Feb 2011

    Posted 08 Nov 2012 Link to this post

    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
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 13 Nov 2012 Link to this post

    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.

  3. DevCraft banner
Back to Top