Validation and tab control

3 posts, 0 answers
  1. Thomas
    Thomas avatar
    19 posts
    Member since:
    Sep 2010

    Posted 17 Feb 2011 Link to this post

    I have a validators on my cotrols, when I am switching tabs validation errors disapear for all controls.

     <TextBox Text="{Binding SelectedJob.Well.Formation,ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" />

    Can you suggest a fix for this problem?
  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 22 Feb 2011 Link to this post

    Hello Thomas,

    When you give the TabControl a ContentTemplate and bind it to some collection of items, then switching between tabs makes the TabControl unload the content of the last active item and load the content of the newly selected item. The reason is that the RadTabControl has only one ContentPresenter which holds the currently selected RadTabItem for performance optimization. And since the load/unload operations involve add/remove actions in the visual tree, the content does not keep its state.

    However, we have logged this issue as a feature request in our PITS where you will be able to track its progress and vote for it thus increasing its priority.

    As a workaround, you can keep the state of the RadTabItem's content in a ViewModel. If you can elaborate on your scenario and the ViewModels we will try to provide you with a possible implementation.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft R3 2016 release webinar banner
  4. Jawahar
    Jawahar avatar
    1 posts
    Member since:
    Jun 2014

    Posted 06 Jun 2014 in reply to Thomas Link to this post

    Refer this

Back to Top