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

GridView inside TabControl

1 Answer 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fabiana
Top achievements
Rank 1
Fabiana asked on 08 Jul 2010, 06:12 PM
Hello support!!

I need to configure TabControl height and Width to  adjust with page size, so I set Width="Auto" Height="Auto".
But, inside TabControl, I have GridView...How to resolve perfomance problem in this case, please??? Is there a way???
Thanks!!


<UserControl x:Class="SilverlightControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="600" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    
    <Grid x:Name="LayoutRoot" Background="White">

        <telerik:RadTabControl x:Name="RadtcbMail" Margin="10,10,10,10" SelectedIndex="0" Width="Auto" Height="Auto">

            <telerik:RadTabItem x:Name="RadtbiInbox" Header="Inbox"  >
                <telerik:RadGridView  Margin="10,10,10,10" x:Name="RadgrdInbox"  VerticalAlignment="Stretch" Width="Auto" Height="Auto">
                    <telerik:RadGridView.Columns>

                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </telerik:RadTabItem>
          
        </telerik:RadTabControl>


    </Grid>
</UserControl>

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 13 Jul 2010, 11:08 AM
Hello Fabiana,

These problems occur when the grid is placed in a control that measures its children with infinity.  Such controls are ScrollViewer,  StackPanel (when vertical it measures with infinite height and when horizontal - with infinite width), and Grid panel with RowDefinition Height="Auto" or ColumnDefinition Width="Auto". When RadGridView (or any other grid) is measured with infinity virtualization is turned off which results in reduced performance. Modify your code so that RadGridView is placed in a container that will not measure it with infinity and the performance will be back to normal.

Regards,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Fabiana
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or