Slow scrolling with radgridview

8 posts, 0 answers
  1. Stephen
    Stephen avatar
    3 posts
    Member since:
    Jun 2012

    Posted 24 Jun 2012 Link to this post

    I just started with a trial of your controls. I am running a WPF datagrid side-by-side with your radgridview to compare operation. The radgridview scrolling is too slow and jerky with my small test data set (8 columns, 2500 rows of doubles). My XAML is simple

    <telerik:RadGridView Name="radGridView1" HorizontalAlignment="Left" />

     I bind to a datatable as follows:

    radGridView1.ItemsSource = logTable.DefaultView;

    I notice that your radgridview has some features I probably don't need for this application, such as grouping by column, and some filtering in the columns. Can I turn these off and get faster scrolling?


  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 25 Jun 2012 Link to this post

    Hello,

    In order to increase the performance of the GridView I would recommend you to not place the RadGridView in controls/panels which will measure it with infinity. Such panels are the ScrollViewer, the StackPanel and Grid with Row.Height=Auto. More on how to increase the performance is described in this help article

    You can as well disable some features using their properties (for example CanUserInsertRows). If you load all of the data at once, this uses more memory as well.

    I hope this helps you to improve the scrolling.

    All the best,
    Didie
    the Telerik team

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

  3. Stephen
    Stephen avatar
    3 posts
    Member since:
    Jun 2012

    Posted 25 Jun 2012 Link to this post

    My full XAML is below. I am using a DockPanel. The DockPanel gets put into a tab control, and the tabcontrol is in a grid. I have a Datagrid and RadGridView using the same data for comparison. The Datagrid scrolls quickly and smoothly. The RadGridView is way too slow and does not scroll smoothly. I have tried turning off some features in the properties, but nothing has mad a difference so far.

    <UserControl x:Class="WellLab.UI.LogViewer"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 mc:Ignorable="d"
                 d:DesignHeight="300" d:DesignWidth="300" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
        <Grid>
            <DockPanel Height="Auto" HorizontalAlignment="Stretch" Margin="0" Name="dockPanel1" VerticalAlignment="Stretch" Width="Auto">
                <ToolBarTray Height="26" Name="toolBarTray1" Width="Auto" />
                <DataGrid AutoGenerateColumns="True" Height="Auto" Name="logDataGrid" Width="Auto" ItemsSource="{Binding Path=.}"  HorizontalAlignment="Left" LoadingRow="logDataGrid_LoadingRow">
                    <DataGrid.RowHeaderTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGridRow}}, Path=Header}"></TextBlock>
                        </DataTemplate>
                    </DataGrid.RowHeaderTemplate>
                </DataGrid>
                <telerik:RadGridView Name="radGridView1" HorizontalAlignment="Left" CanUserSortColumns="False" />
            </DockPanel>
        </Grid>
    </UserControl>
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Jun 2012 Link to this post

    Hello,

     I would suggest you to try setting ScrollMode=Deferred for the GridView.

     Please let me know if this helps.

    Kind regards,
    Didie
    the Telerik team

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

  5. Stephen
    Stephen avatar
    3 posts
    Member since:
    Jun 2012

    Posted 26 Jun 2012 Link to this post

    Thanks. That solves the problem.

    Do you have any example projects that deal with large amounts of numeric data in a gridview? Seeing an example it might help me to understand how best to use this control.
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 27 Jun 2012 Link to this post

    Hi,

     You could check our online examples. The same examples are available within WPF Demos that you should have installed locally.

    All the best,
    Didie
    the Telerik team

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

  7. Barbara
    Barbara avatar
    1 posts
    Member since:
    Jan 2015

    Posted 08 May 2015 in reply to Dimitrina Link to this post

    Hi,

    I tried using the 'Deferred' option to scroll which made the scroll-bar more smooth but then when I stop it takes a second to actually get that row in view. Is there any solution to that??  

  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 11 May 2015 Link to this post

    Hi,

    You can try setting fixed width for the columns.
    As it turns out this would be the expected behavior as RadGridView needs to calculate and realize the visual elements at the exact position the user have scrolled to. 

    Regards,
    Dimitrina
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top