Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Null reference exception thrown when click the filter icon in row header area.
Note: This issue occurs only when the FieldMappingName and FieldHeader is not same. If both values are same, it works properly.
Please find the stacktrace details below,
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.PivotAnalysis.FilterHelper.<>c_DisplayClass15.<GetFilterItem>b_7(PivotItem x)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Syncfusion.Windows.Forms.PivotAnalysis.FilterHelper.GetFilterItem(PropertyDescriptor propertyDescriptor, PivotGridControl pivotGrid, String format)
at Syncfusion.Windows.Forms.PivotAnalysis.RowGroupBar.RowGroupBar_CellButtonClicked(Object sender, GridCellButtonClickedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnCellButtonClicked(GridCellButtonClickedEventArgs e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCellButtonClicked(Int32 rowIndex, Int32 colIndex, Int32 index, GridCellButton button)
catched at Syncfusion.Windows.Forms.Grid.GridControlBase.RaiseCellButtonClicked(Int32 rowIndex, Int32 colIndex, Int32 index, GridCellButton button) in :line 0
The cause of the error is if the .FieldHeader is set
Me.PivotGridControl1.PivotRows.Add(New PivotItem With
{ .FieldMappingName = "Ship Country", .TotalHeader = "Total", .FieldHeader = "Country" })