Posted 23 June 2022, 2:41 pm EST
Hi,I using GcSpreadGrid.
How can custom cell like in the attached image?

Thanks.
Forums Home / ComponentOne / WPF Edition Topics
Posted by: quockhanhk15tpm on 23 June 2022, 2:41 pm EST
Posted 23 June 2022, 2:41 pm EST
Hi,Marked as Answer
Replied 23 June 2022, 6:18 pm EST
Hi,
DataTemplateCellType dtCellType = new DataTemplateCellType();
spread.Columns[2].CellType = dtCellType;
dtCellType.DisplayElementTemplate= this.Resources["dtCellTemplate"] as DataTemplate;
<Window.Resources>
<DataTemplate x:Key="dtCellTemplate">
<Border CornerRadius="8" BorderThickness="3" BorderBrush="Blue" Margin="0">
<TextBlock Text="{Binding Value}" Width="100" TextAlignment="Center" Foreground="Blue"/>
</Border>
</DataTemplate>
</Window.Resources>
Replied 23 June 2022, 7:05 pm EST
Hi,