Category / Section
How to make dropdowns in cells using cell templates
1 min read
It can be achieved by using the combo box in the control template for the corresponding target PivotGridTemplateCell. The following code snippet explains the same.
XAML
<Style x:Key="valStyle" TargetType="{x:Type syncfusion:PivotGridTemplateCell}"> <Setter Property="MinHeight" Value="25"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type syncfusion:PivotGridTemplateCell}"> <ComboBox Width="50" SelectedIndex="0"> <ComboBoxItem Content="{Binding}"/> <ComboBoxItem Content="Item2"/> </ComboBox> </ControlTemplate> </Setter.Value> </Setter> </Style>
Figure: Pivot Grid shows dropdowns as cell templates