BoldDesk®Customer service software with ticketing, live chat & omnichannel support, starting at $99/mo for unlimited agents. Try it for free!
Hi,
I have a pivot view, and whether I set the width to a set size or put it in a container the first column doesn't stay frozen like in the examples and there seems to be no field relating to set it. The column headers freeze automatically with no issue.
Is there a conflict with the way we have done the pivot?
Thanks
<MudPaper Height="80vh">
<SfPivotView ID="pivotForecast" @ref="pivotForecast" TValue="ForecastChunk" Height="90%" AllowConditionalFormatting="true" Width="100%">
<PivotViewCellEditSettings AllowEditing="true" AllowInlineEditing="true" AllowCommandColumns="true" Mode="EditMode.Normal"></PivotViewCellEditSettings>
<PivotViewEvents OnActionBegin="PivForecast_OnActionBegin" CellSelected="CellSelected" TValue="ForecastChunk" OnActionComplete="PivForecast_OnActionComplete" DrillThrough="PivForecast_drillThrough" EditCompleted="PivForecast_EditCompleted"></PivotViewEvents>
<PivotSortSetting></PivotSortSetting>
<PivotViewDataSourceSettings DataSource="ForecastChunks" ExpandAll="false" ShowColumnGrandTotals="false" ShowGrandTotals="false" ShowColumnSubTotals="false" AlwaysShowValueHeader="true" EmptyCellsTextContent="-">
<PivotViewColumns>
<PivotViewColumn Name="Year" ExpandAll="true"></PivotViewColumn>
<PivotViewColumn Name="YearMonth"></PivotViewColumn>
</PivotViewColumns>
<PivotViewRows>
<PivotViewRow Name="Chunk" ExpandAll="@_expandRows"></PivotViewRow>
<PivotViewRow Name="Channel"></PivotViewRow>
</PivotViewRows>
<PivotViewValues>
<PivotViewValue Name="Value"></PivotViewValue>
</PivotViewValues>
<PivotViewFormatSettings>
<PivotViewFormatSetting Name="Value" Format="N0"></PivotViewFormatSetting>
</PivotViewFormatSettings>
<PivotViewGridSettings AllowSelection="true" ColumnWidth="120">
<PivotViewSelectionSettings Mode="@Syncfusion.Blazor.PivotView.SelectionMode.Cell" Type="@PivotTableSelectionType.Multiple" CellSelectionMode="PivotCellSelectionMode.Box"></PivotViewSelectionSettings>
</PivotViewGridSettings>
<PivotViewConditionalFormatSettings>
<PivotViewConditionalFormatSetting Label="@($"{DateTime.Now:yyyyMM}")" Measure="Value" Conditions="Condition.NotEquals" Value1="-1">
<PivotViewStyle BackgroundColor="#E6F3F8" FontSize="14px" FontFamily="Inter"></PivotViewStyle>
</PivotViewConditionalFormatSetting>
<PivotViewConditionalFormatSetting Label="ALL" Measure="Value" Conditions="Condition.NotEquals" Value1="-1">
<PivotViewStyle BackgroundColor="#FFF7D8" FontSize="14px" FontFamily="Inter"></PivotViewStyle>
</PivotViewConditionalFormatSetting>
<PivotViewConditionalFormatSetting Label="1 - SOH" Measure="Value" Conditions="Condition.LessThan" Value1="0">
<PivotViewStyle BackgroundColor="#FFC7CE" FontSize="14px" FontFamily="Inter"></PivotViewStyle>
</PivotViewConditionalFormatSetting>
<PivotViewConditionalFormatSetting Label="7 - FwdCoverDays" Measure="Value" Conditions="Condition.NotBetween" Value1="45" Value2="60">
<PivotViewStyle BackgroundColor="#FFC7CE" FontSize="14px" FontFamily="Inter"></PivotViewStyle>
</PivotViewConditionalFormatSetting>
@for (var i = 1; i < 12; i++) // Sets every month in the past to white
{
<PivotViewConditionalFormatSetting Label="@($"{DateTime.Now.AddMonths(-i):yyyyMM}")" Measure="Value" Conditions="Condition.NotEquals" Value1="-1">
<PivotViewStyle BackgroundColor="#FFFFFF" FontSize="14px" FontFamily="Inter"></PivotViewStyle>
</PivotViewConditionalFormatSetting>
}
<PivotViewConditionalFormatSetting Label="1 - Shortfall" Measure="Value" Conditions="Condition.LessThan" Value1="0">
<PivotViewStyle BackgroundColor="#FF8E8E" FontSize="14px" FontFamily="Inter"></PivotViewStyle>
</PivotViewConditionalFormatSetting>
</PivotViewConditionalFormatSettings>
</PivotViewDataSourceSettings>
</SfPivotView>
</MudPaper>
Hi Andrew,
Thank you for sharing the code example. We understand that you are facing an issue where the first column does not stay frozen while you scroll horizontally through the pivot table. However, we were unable to reproduce this issue when rendering the PivotTable with the MudBlazor library; the first column freezes as expected during horizontal scrolling. We suspect the issue may have occurred due to additional CSS customization in your application. Furthermore, while reviewing your code, we noticed that you have placed the PivotViewGridSettings tag inside the PivotViewDataSourceSettings, which is incorrect. The PivotViewGridSettings tag should be placed outside of the PivotViewDataSourceSettings. Please see the code example below for reference.
<MudPaper Height="80vh"> <SfPivotView ID="PivotView" @ref="Pivot" TValue="ProductDetails"> <PivotViewDataSourceSettings DataSource="@data"> </PivotViewDataSourceSettings> <PivotViewGridSettings AllowSelection="true" ColumnWidth="120"> <PivotViewSelectionSettings Mode="@Syncfusion.Blazor.PivotView.SelectionMode.Cell" Type="@PivotTableSelectionType.Multiple" CellSelectionMode="PivotCellSelectionMode.Box"></PivotViewSelectionSettings> </PivotViewGridSettings> </SfPivotView> </MudPaper> |
Output GIF:
For your reference, we are sharing a sample that we tested using the provided pivot table configuration. Please find it attached below.
However, if the problem persists, please replicate it in the provided samples and get back to us, or share a dummy runnable sample that reproduces the issue. This will allow us to investigate the reported problem on our end and provide a solution as soon as possible.
Regards,
Sridhar Karunakaran