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

EnableCaching = "true" causing PivotGrid to remain empty

1 Answer 146 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Tayonee
Top achievements
Rank 1
Tayonee asked on 18 Jun 2014, 07:29 PM
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.
    pvtCMStoG2.DataBind()
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 :)

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 23 Jun 2014, 12:17 PM
Hello,

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

Regards,
Viktor Tachev
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.

 
Tags
PivotGrid
Asked by
Tayonee
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or