RadTabControl problem

3 posts, 0 answers
  1. Fatima
    Fatima avatar
    11 posts
    Member since:
    Oct 2011

    Posted 27 Oct 2011 Link to this post

    i but 5 RadGridview in RadTabControl when we have many TabItem ,the problem is for each selected TabItem  the event load is launch.
    for me all  RadGridView is loaded in the first time when i load the view. 

    my question:there is a possibilty to stop load when i select TabItem  ?
    i find just a possibilty to keep the already selected TabItem ,is not a solution for my problem because i want to block all event load.
  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 01 Nov 2011 Link to this post

    Hi Fatima,

    When you select RadTabItem, the PreviewSelectionChanged event fires first and then comes the SelectionChanged event. You can perform some logic in the preview event and set e.handled = true so that the SelectionChanged is not fired.
    On the other hand, how can you make so that not every GridView in your RadTabItems loads? You can use ContentTemplate like so:

    <Grid x:Name="LayoutRoot">
                <DataTemplate x:Key="contemplate">
                    <telerik:RadGridViewView />
                <DataTemplate x:Key="itemplate">
                    <TextBlock Text="{Binding Name}" />
                <telerik:RadTabControl ContentTemplate="{StaticResource contemplate}"
                                       ItemTemplate="{StaticResource itemplate}"
    This way if you bind the TabControl to collection of 5 business objects , only the first RadGridView will load. If static RadTabItems were used, all the 5 RadGridView would have been loaded initially. 
    Please let us know if this helped you.

    Petar Mladenov
    the Telerik team

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

  3. DevCraft R3 2016 release webinar banner
  4. Fatima
    Fatima avatar
    11 posts
    Member since:
    Oct 2011

    Posted 01 Nov 2011 Link to this post

    thanks for your answer ,it's helpful
Back to Top