GridViewDataColumn generation very slow when using aggregate functions

5 posts, 0 answers
  1. Ulrich
    Ulrich avatar
    10 posts
    Member since:
    Jul 2011

    Posted 15 Oct 2014 Link to this post

    Dear Telerik-Team,

    creating many GridViewDataColumn (about 500) in code behind and
    adding them to a RadGridView (using RadGridView.Columns.Add() ) is working in a reasonable amount of time (<1 ms for each column). 
    I am also adding AggregateFunctions to each of those columns (GridViewDataColumn.AggregateFunctions.Add()).
    The function to create and add the columns is called in the class constructor right after InitializeComponent();
    The RadGridView control itself is defined in XAML.

    Now to the actual issue :

    The problem arises when columns are added or recreated after that. 
    Then, adding columns to the gridview is really slow ( > 10 - 50 ms for each column).
    I remove all columns using RadGridView.Columns.Clear() prior to adding the new ones.
    This issue only comes up when AggregateFunctions were added to the columns before.
    And it is not just getting slower - the time it takes to add a column actually increases with each column then.

    Do have any idea what the reason for this behaviour might be?

    Thanks and Kind Regards!

  2. Ulrich
    Ulrich avatar
    10 posts
    Member since:
    Jul 2011

    Posted 16 Oct 2014 Link to this post

    Version of Telerik.Windows.Controls.GridView.dll  is 2014.1.331.45 .
  3. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Oct 2014 Link to this post

    Hello,

    As the version you use is old (2014.1.331.45), would you please also test with our latest version?

    Generally, I can suggest you to check the Tips and Tricks article on improving the performance of RadGridView. Does any of those suggestions help?

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. Ulrich
    Ulrich avatar
    10 posts
    Member since:
    Jul 2011

    Posted 20 Oct 2014 in reply to Dimitrina Link to this post

    Hi Dimitrina,

    i tested again with your latest version and have gone through all performance tips, but the issue is still present.

    However, i was able to find a workaround by setting the RadGridView.ItemsSource = null
    then adding the columns and finally setting the ItemsSource back to its original value!

    btw. : I have a VS-project which i like to upload regarding this issue. How can i do that?
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Oct 2014 Link to this post

    Hi,

    I am glad to hear you managed to find a workaround. You can open a new support thread and attach the demo project there.

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top