Won't Fix
Last Updated: 25 Sep 2015 11:44 by ADMIN
ADMIN
Kostadin
Created on: 17 Sep 2015 13:28
Category: UI for ASP.NET AJAX
Type: Bug Report
1
Persisted grid state with Q2 2014 version of UI for ASP.NET AJAX does not load aggregates with the newer version.

		
1 comment
ADMIN
Daniel
Posted on: 25 Sep 2015 11:44
Can't address this issue without breaking other functionality. It is possible to use a workaround (shown below) which is actually needed only until the first state save. After you save the settings once, you won't need this workaround.

protected void Button2_Click(object sender, EventArgs e)
{
var currentSettings = RadGrid1.MasterTableView.ColumnSettings;
RadPersistenceManager1.StorageProviderKey = "OldVersion";
RadPersistenceManager1.LoadState();

//workaround code
foreach (Telerik.Web.UI.GridTableView.PersistableColumnSetting setting in RadGrid1.MasterTableView.ColumnSettings)
{
GridBoundColumn column = RadGrid1.MasterTableView.GetColumn(setting.UniqueName) as GridBoundColumn;
if (column != null)
{
column.Aggregate = (currentSettings.Where(c => c.UniqueName == setting.UniqueName).FirstOrDefault() as Telerik.Web.UI.GridTableView.PersistableColumnSetting).Aggregate;
}
}

RadGrid1.Rebind();
}