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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

2
Votes

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" }

)