This question is locked. New answers and comments are not allowed.
I am working on creating a pivot table using the Telerik RadGridView for Silverlight. The current implementation creates an ObservableCollection of
The columns are created as such:
I am currently using default binding (my cell instances override ToString() and return a simple string. Scrolling performance is fine if the pivot is all rows (permutations of axis/axis value combinations), but when it's all columns (#of rows and columns are interchanged) performance slows to a crawl.
So I have a few questions. First, is there a better way to handle this than creating an ObservableCollection<PivotRow> and filling in every cell? I lazily load some of the underlying data when pivot detail cells are actually fetched, however I'd much rather be able to specify my bounds (which can be huge) and fill in cells as requested. Second, how do I get performance back when the # of columns is quite large?
public class PivotRow{ private Dictionary<string, PivotCell> _Cells = new Dictionary<string, PivotCell>(); public Dictionary<string, PivotCell> Cells { get { return _Cells; } }}The columns are created as such:
PivotDataGrid.ItemsSource = null;PivotDataGrid.Columns.Clear();for (var i = 0; i < this.Query.Display.RowAxes.Count; i++){ PivotDataGrid.Columns.Add( new GridViewDataColumn() { DataMemberBinding = new Binding("Cells[PRC" + i + "]"), IsReadOnly = true });}if (this.Query.Display.ColumnAxes.Count > 0){ PivotDataGrid.Columns.Add( new GridViewDataColumn() { DataMemberBinding = new Binding("Cells[CPAC]"), IsReadOnly = true });}for (var i = 0; i < pivotMatrixColumnCount; i++){ PivotDataGrid.Columns.Add( new GridViewDataColumn() { DataMemberBinding = new Binding("Cells[M" + i + "]"), IsReadOnly = true });}I am currently using default binding (my cell instances override ToString() and return a simple string. Scrolling performance is fine if the pivot is all rows (permutations of axis/axis value combinations), but when it's all columns (#of rows and columns are interchanged) performance slows to a crawl.
So I have a few questions. First, is there a better way to handle this than creating an ObservableCollection<PivotRow> and filling in every cell? I lazily load some of the underlying data when pivot detail cells are actually fetched, however I'd much rather be able to specify my bounds (which can be huge) and fill in cells as requested. Second, how do I get performance back when the # of columns is quite large?
