To reproduce: - Add calculated field - Try to set its number format, by clicking the Number Format option in the context menu in the field list (see image) Workaround: Private Sub RadPivotGrid1_CellFormatting(sender As Object, e As UI.PivotCellEventArgs) Handles RadPivotGrid1.CellFormatting If e.CellElement.Column.Name = "Commission" Then e.CellElement.Text = String.Format(System.Threading.Thread.CurrentThread.CurrentUICulture, "{0:C}", e.CellElement.Value) End If End Sub
To reproduce: 1. Add a RadPivotGrid and change its theme to TelerikMetro. This theme uses Segoe UI font for its cells. 2. Export the RadPivotGrid. 3. You will notice that the font is applied to some of the cells, but for others, e.g. Grand Total the default font is set to Microsoft Sans Serif Second scenario: use Demo application PivotGrid >> Export to Excel example. Use ControlDefault theme. 1. Ctrl + H to show the spy. Check font for row "Jun-1 >> Sum of Net", column "Printer stand >> 1 Free with 10". The font is Segoe UI. 2. Run the export and check the same cell in Excel. Its font is Microsoft Sans Serif. Workaround: use the PivotExcelCellFormatting event to specify the font.
Argument exception when a specific layout is loaded: "An item with the same key has already been added."
Workaround: void exporter_PivotExcelCellFormatting(object sender, ExcelPivotCellExportingEventArgs e) { double d; if (double.TryParse(e.Cell.Text, out d)) { e.DataType = "double"; } }
To reproduce: use the following code snippet. It is reproducible in target framework less than .NET Framework 4.0. Sub New() InitializeComponent() Me.RadPivotGrid1.RowGroupDescriptions.Add(New DoubleGroupDescription() With { _ .PropertyName = "EmployeeID", _ .GroupComparer = New GroupNameComparer() _ }) UpdatePivotGrid() End Sub Private Sub UpdatePivotGrid() Dim ds As DataSet = New DataSet Dim conn As New SqlConnection("Data Source=.;Initial Catalog=Northwind;Integrated Security=True") Dim cmd As New SqlCommand("SELECT * FROM Orders", conn) conn.Open() Dim da As SqlDataAdapter = New SqlDataAdapter(cmd) da.Fill(ds) ds.Dispose() Me.RadPivotGrid1.DataSource = ds.Tables(0) Me.RadPivotGrid1.Refresh() End Sub Please refer to the attached gif file. Workaround : use .NET Framework 4.0.
Workaround: private void radButton1_Click(object sender, EventArgs e) { radPivotGrid1.RowGroupsExpandBehavior = new GroupsExpandBehavior() { Expanded = true }; radPivotGrid1.ColumnGroupsExpandBehavior = new GroupsExpandBehavior() { Expanded = true }; radPivotGrid1.DataProvider.Refresh(); ExportTo.ExportToExcel(this); radPivotGrid1.RowGroupsExpandBehavior = new GroupsExpandBehavior() { Expanded = false }; radPivotGrid1.ColumnGroupsExpandBehavior = new GroupsExpandBehavior() { Expanded = false }; radPivotGrid1.DataProvider.Refresh(); }
To reproduce: Create a localization provider following the article - http://wwwsit.telerik.com/help/winforms/pivotgrid-localization-localization.html. When you start the app you will see that the PivotAggregateP0ofP1 is not used. Workaround: Use the formatting events to format the needed values - http://wwwsit.telerik.com/help/winforms/pivotgrid-formatting-appearance.html
To reproduce: private void Form1_Load(object sender, EventArgs e) { this.ordersTableAdapter.Fill(this.nwindDataSet.Orders); LocalDataSourceProvider dataProvider = new LocalDataSourceProvider(); dataProvider.Culture = new System.Globalization.CultureInfo("ru-RU"); dataProvider.ItemsSource = this.ordersBindingSource; dataProvider.BeginInit(); dataProvider.RowGroupDescriptions.Add(new DateTimeGroupDescription() { PropertyName = "OrderDate", Step = DateTimeStep.Year, GroupComparer = new GroupNameComparer() }); dataProvider.RowGroupDescriptions.Add(new DateTimeGroupDescription() { PropertyName = "OrderDate", Step = DateTimeStep.Quarter, GroupComparer = new GroupNameComparer() }); dataProvider.RowGroupDescriptions.Add(new DateTimeGroupDescription() { PropertyName = "OrderDate", Step = DateTimeStep.Month, GroupComparer = new GroupNameComparer() }); dataProvider.ColumnGroupDescriptions.Add(new PropertyGroupDescription() { PropertyName = "EmployeeID", GroupComparer = new GrandTotalComparer() }); dataProvider.EndInit(); dataProvider.BeginInit(); dataProvider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Freight", AggregateFunction = AggregateFunctions.Sum }); dataProvider.AggregateDescriptions.Add(new PropertyAggregateDescription() { PropertyName = "Freight", AggregateFunction = AggregateFunctions.Average }); dataProvider.EndInit(); this.radPivotGrid1.DataProvider = dataProvider; } Workaround: CultureInfo russianCultureInfo = new System.Globalization.CultureInfo("ru-RU"); List<string> monthNames = DateTimeFormatInfo.CurrentInfo.MonthNames.ToList(); public Form1() { InitializeComponent(); this.radPivotGrid1.GroupDescriptorElementCreating += radPivotGrid1_GroupDescriptorElementCreating; } private void radPivotGrid1_GroupDescriptorElementCreating(object sender, GroupDescriptorElementCreatingEventArgs e) { if (e.GroupDescriptorElement.Text == "Month") { e.GroupDescriptorElement.FilterPopup.PopupOpening -= FilterPopupPopupOpening; e.GroupDescriptorElement.FilterPopup.PopupOpening += FilterPopupPopupOpening; } } private void FilterPopupPopupOpening(object sender, CancelEventArgs args) { PivotGroupFilterPopup popup = sender as PivotGroupFilterPopup; if (popup != null) { popup.TreeViewMenuItem.TreeElement.TreeView.NodeFormatting -= TreeView_NodeFormatting; popup.TreeViewMenuItem.TreeElement.TreeView.NodeFormatting += TreeView_NodeFormatting; } } private void TreeView_NodeFormatting(object sender, TreeNodeFormattingEventArgs e) { DateTime date; int monthIndex = monthNames.IndexOf(e.Node.Text); if (monthIndex > -1) { e.Node.Text = russianCultureInfo.DateTimeFormat.MonthNames[monthIndex]; } }
To reproduce: Open the demo application and navigate to Pivot -> Printing. Move the Aggregates descriptor next to the Product one and remove the Promotions descriptor. Click PrintPreview and you will see that the Product descriptor will not be visible
To reproduce: Bind RadPivotGrid and associate it with RadPivotFieldList. Start the application and start selecting/unselecting fields from the field list. Observe how the memory usage is raising.
To reproduce: - Open the demo application and navigate to the olap browser demo. - Click the filter icon in the Product Line (top left corner).
To reproduce: 1. Drag and drop RadPivotGrid. 2. On FormLoad call BestFitRowHeaders() method 3. When run the project, an exception is thrown
To reproduce: Bind a RadPivotGrid and set the theme to Breeze. You will see that there are no filtering buttons. Workaround: Use the following code to set an image to the buttons: protected override void OnLoad(EventArgs e) { base.OnLoad(e); List<PivotFilterFunctionButton> elements = this.FindAllElements<PivotFilterFunctionButton>(this.pivot.PivotGridElement); Image img = Image.FromFile(@"filter.png"); foreach (PivotFilterFunctionButton item in elements) { item.Image = img; } } public List<T> FindAllElements<T>(RadElement parent) where T : RadElement { List<T> list = new List<T>(); this.FindAllElementsCore(parent, list); return list; } private void FindAllElementsCore<T>(RadElement parent, List<T> list) where T : RadElement { if (parent is T) { list.Add(parent as T); return; } foreach (RadElement item in parent.Children) { FindAllElementsCore<T>(item, list); } } The image can be downloaded below.
One cannot copy cells from collapsed row groups.
I came across an exception when trying to use the Report Filter area with data that contains blank (DBNull) values. It looks like the control tries to build a distinct list of values to show in the filter's drop-down, but throws an exception if one of the values is blank. I attached a ZIP file with a Visual Studio project that demonstrates the issue, and included a Word file to describe how to reproduce the error. Any assistance is greatly appreciated. Thank you. Drew White Developer CRMCulture, LLC Email: dwhite@CRMCulture.com Web: http://www.crmculture.com
To reproduce: Create a RadPivotGrid with some data and export it by following the article http://www.telerik.com/help/winforms/pivotgrid-export-to-excel.html Set the following settings to the exporter: exporter.ShowGridLines = true; exporter.ExportVisualSettings = true; exporter.HeaderCellsFont = new System.Drawing.Font("Arial", 8); exporter.DataCellsFont = new System.Drawing.Font("Arial", 8); exporter.GridLinesColor = Color.Black; exporter.CellBackColor = Color.White; exporter.SheetName = this.ClientManager.CubeEngine.Title; exporter.ExportFlatData = false; Also subscribe to the PivotExcelCellFormatting event use the following code: e.Cell.TextAlignment = ContentAlignment.MiddleRight; e.Cell.DrawBorder = true; e.Cell.BorderColor = Color.Black; e.Cell.DrawText = true; e.Cell.DrawFill = true; You will see that the exported cells will not have borders, nor their font will be changed. Additionally, if you set a specific ForeColor, BackColor, it is not applied as well.
To reproduce: - Change some cell properties and export the grid. - You will notice that the the changed properties are not exported.
To reproduce: - Add a pivot grid and a field list to a blank form. - Populate the pivot grid with LocalDataSourceProvider - Show and close the form several times and collect the garbage. - The memory is freed properly. - Bind the controls and show and close the form several times again. - After the garbage collection the memory is not freed.
If you have an object with string property and for all the available objects in the RadPivotgrid you have numeric values for this property with leading zero digits (e.g. "002"), it is exported in Excel as a numeric cell.