2X faster development
The ultimate WPF UI toolkit to boost your development speed.
WPF DataGrid (SfDataGrid) having grid lines for each row and column. But we can remove the grid lines for default row by write style for BorderThickness of GridCell. And remove the grid lines for caption row by write style for BorderThickness of GridCaptionSummaryCell and GridIndentCell.
Refer to the following code for writing style for summary cells to show the vertical border. <Style TargetType="syncfusion:GridCell"> <Setter Property="BorderThickness" Value="0"/> </Style> <Style TargetType="syncfusion:GridIndentCell"> <Setter Property="BorderThickness" Value="0"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type syncfusion:GridIndentCell}"> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="syncfusion:GridCaptionSummaryCell"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type syncfusion:GridCaptionSummaryCell}"> <Border x:Name="PART_GridCaptionSummaryCellBorder" BorderThickness="0" SnapsToDevicePixels="True"> <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="True" /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
Reference links: https://help.syncfusion.com/wpf/datagrid/styles-and-templates https://help.syncfusion.com/wpf/datagrid/conditional-styling
|
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.