A couple of years ago I've created a custom GridViewCell Template that allowed me to set a custom border inside a cell.
All I had to do was change the BorderBrush and BorderThickness properties of the GridViewCell's style.
But since I've updated to a newer version of the control, this has stopped working. Now the left border is missing.
In the past I've had trouble with the bottom border but setting bottom margin to 1 solved that.
However changing the left margin doesn't fix the visibility of the left border.
This is the original custom GridViewCemm Template:
<Style TargetType="telerik:GridViewCell" x:Key="DefaultCellStyle"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="telerik:GridViewCell"> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"> <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ToolTip="{TemplateBinding ToolTip}" VerticalAlignment="Center" Margin="3,0"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="telerik:StyleManager.Theme" Value="Windows8" /> <Setter Property="Margin" Value="0,0,0,1" /></Style>
An example of how I used this:
<telerik:GridViewDataColumn Header="Example" DataMemberBinding="{Binding MyBinding}" Width="100"> <telerik:GridViewDataColumn.CellStyle> <Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource DefaultCellStyle}"> <Setter Property="BorderBrush" Value="Blue"/> <Setter Property="BorderThickness" Value="2"/> </Style> </telerik:GridViewDataColumn.CellStyle></telerik:GridViewDataColumn>
My previous version of the the control was: 2016.3.1024.45 Here the cell had a perfect border of thickness 2 all-round.
Current version: 2018.1.220.45 Here the left border is missing, the other borders are working fine.
I've tried several things but simply can't get it to work any more.