EnableCaching = "true" causing PivotGrid to remain empty

2 posts, 0 answers
  1. Tayonee
    Tayonee avatar
    52 posts
    Member since:
    Nov 2006

    Posted 18 Jun 2014 Link to this post

    I am running my RadPivotGrid off of a SQL Server datasource. We are running on a decently large initial result set (about 3000 records) and so in the datasource "selecting" method I check to see if this is a postback or not. If it is, I cancel the event (so we don't have to wait to load results the first time around before proper filters are applied).

    I haven't seen a lot of discussion on the forum on this EnableCaching property and how it is supposed to work. What I have noticed is that if I cancel that first event (and have EnableCaching="true") the PivotGrid never again displays any results. 

    The search form, to which the datasource is connected is activated with each click of the Search button by this event handler:

    Protected Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click
        'Bind the pivot grid.
    End Sub

    Is there some other method I should use?

    Secondarily, I noticed that there is a property on the PivotGrid for Performance Optimization using the IQueryable type results but for the life of me can't find any real documentation or samples of what that is all about... I need to speed up the performance of the PivotGrid beyond its current speed or I am going to have the users complaining all over the place :)
  2. Viktor Tachev
    Viktor Tachev avatar
    2160 posts

    Posted 23 Jun 2014 Link to this post


    The EnableCaching property allows the caching of the pivot view model in the session state. This could improve performance of RadPivotGrid for large sets of data. If you would like you could take a look at the following article that elaborates more on the matter:

    Caching in RadPivotGrid

    If you do not want to display the RadPivotGrid initially, you could set its Visibility property to false. This way the control would not be rendered on the page. When you would like to show the data, you could set the RadPivotGrid to be visible again.

    Regarding your second question, you could bind the RadPivotGrid to a data source that is IQueryable. You could use the NeedDataSource handler for the control and provide the necessary data. Check out the following article that describes how advanced data binding could be used with RadPivotGrid.

    RadPivotGrid Advanced data binding

    Viktor Tachev

    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