A pivotcontrol with the config below and NO elements in the source
throws the following exception
Width and Height must be non-negative.
at System.Windows.Size..ctor(Double width, Double height)
at System.Windows.Controls.ScrollViewer.OnLayoutUpdated(Object sender, EventArgs e)
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()....
<syncfusion:PivotGridControl x:Name="pivotGrid1" ItemSource="{Binding ProductSalesData}" Margin="10"
ResizePivotGridToFit="False"
VisualStyle="Metro"
AllowSelection="True" ShowGrandTotals="False" ShowSubTotals="False" GrandTotalRowAlwaysVisible="True">
<syncfusion:PivotGridControl.PivotRows>
<syncfusion:PivotItem FieldMappingName="Product" FieldHeader="Product" TotalHeader="Total"/>
</syncfusion:PivotGridControl.PivotRows>
<syncfusion:PivotGridControl.PivotColumns>
<syncfusion:PivotItem FieldMappingName="Country" FieldHeader="Country" TotalHeader="Total"/>
</syncfusion:PivotGridControl.PivotColumns>
<syncfusion:PivotGridControl.PivotCalculations>
<syncfusion:PivotComputationInfo CalculationName = "Total" Description = "Summation of values" FieldName = "Quantity" Format = "#,##0"/>
</syncfusion:PivotGridControl.PivotCalculations>
</syncfusion:PivotGridControl>
I'm attaching a sample (based in another sample you provided me) where you can see how it fails with numberOfRecords = 0 (in ProductSales.cs ). But if you set it to a number greater than 0, it works ok.
Attachment:
Example_Error_fce56e9a.zip