Set Focus

2 posts, 0 answers
  1. Steve
    Steve avatar
    2 posts
    Member since:
    Oct 2011

    Posted 11 Oct 2011 Link to this post

    I have a tab control defined as:

    <telerik:RadTabControl  x:Name="MyTab" ItemsSource="{Binding Source={StaticResource APBViewModelViewSource}, Path=Model.Items}" SelectedItem="{Binding CurrentItem, Mode=TwoWay}"DisplayMemberPath="TabDisplayMemberPath" ContentTemplate="{StaticResource ContentTemplate}" Margin="10,10,0,0" />

    I have a button that creates a new item in Items.  The CurrentItem is set correctly and the tab automatically changes to the new item. 

    However, there is a specific textbox in the ContentTemplate that I want the focus to be defaulted to when the new item is created.  

    I am using CSLA and am looking for an MVVM way to do this.  Any advice?
  2. Petar Mladenov
    Petar Mladenov avatar
    3130 posts

    Posted 14 Oct 2011 Link to this post

    Hi Steve,

     I am afraid this cannot be achieved since the focus is always set on the RadTabItem when a SelectionChange is performed and we cannot programmatically focus an element in the Content. We'll contact you if we find a way how this could be achieved.

    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top