RadGridView copying large data sets

4 posts, 0 answers
  1. Brad
    Brad avatar
    3 posts
    Member since:
    Jun 2016

    Posted 15 Jun Link to this post

    Hi, I have a RadGridView which is setup to have:

    RowVirtualization=True
    ColumnVirtualization=True
    SelectionMode=Extended
    ClipboardCopymode=Cells,Header
    AutoGenerateColumns=False

    There are 6 columns in this grid all bound to strings similar to
    <telerik:GridViewDataColumn Header="FirstName"  DataMemberBinding="{Binding Name}">

    I have populated the grid with ~60,000 records

    Pressing ctrl+A to select all takes about 3 seconds (which I am ok with I guess)
    My problem is pressing Ctrl+C to copy all the rows just freezes the UI and it never finishes (I force closed the app after about 5 minutes if I walk away for about 20 it finishes eventually)

    Why does copying all these rows take so long? Is there a way I can speed it up?
    I made sure I populated the grid completely first so all this time taken is purely the copy method?

     

  2. Stefan X1
    Admin
    Stefan X1 avatar
    517 posts

    Posted 20 Jun Link to this post

    Hi Brad,

    I am sorry that you are experiencing such performance issue with the copying functionality.

    Unfortunately, with the demonstrated project setup such behavior is not reproducible on my end, so I can only be guessing what the cause for it might be. Can you please share some more details on your project setup, so we can try reproducing such performance degradation of the copying of RadGridView? Generally, any information provided might be useful.

    Best Regards,
    Stefan X1
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Brad
    Brad avatar
    3 posts
    Member since:
    Jun 2016

    Posted 20 Jun in reply to Stefan X1 Link to this post

    Hi StephanX1,

     

    So I have done some investigation of my own and I have found that adding

    void grid_CopyingCellClipboardContent(object sender, GridViewCellClipboardEventArgs e)
    {

         if(e != null && e.Value == null)
             e.Value = string.Empty;
    }

    Drastically reduces the amount of time copying takes so I am guessing it does not like null values for some reason

    Even so ~60,000 records takes 30-60 seconds is that about the best performance I can expect?

    Some of the properties being used are doing small mathematically calculations i.e.

    public decimal TotalValue

    {

       get

       {

       return this.items * this.price;

       }

    }

    Some are also enumeration lookups

    public enum Status
    {
    Unknown = 0,
    Rejected = 'R',
    Approved = 'A',
    }

    If that matters at all for the most part they are plain strings being copied

  5. Stefan X1
    Admin
    Stefan X1 avatar
    517 posts

    Posted 22 Jun Link to this post

    Hello Brad,

    I made a research on the reported scenario and I was not able to find any difference in the performance of the copying mechanism with null values. Based on this I assume that the performance hit is not directly related to the copying of RadGridView. I am glad that you've found a workaround for the issue you are experiencing, however, I can only be guessing what the cause for it might be, as it is not reproducible on my end.

    Best Regards,
    Stefan X1
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top