Hope someone can help with this. I've got a WPF datagrid (see code below). As you can see, I've set the GridLinesVisibility to Vertical and yet, Horizontal grid lines can be seen (please see image below; I need to get rid of the thin horizontal yellow lines). I created a simple WPF datagrid and then set the GridLinesVisibility to Vertical and it didn't display the horizontalgridlines. So I'm not sure what is causing the HorizontalGridLines to be displayed. Any ideas how I can get rid of them? Unfortunately I need to have the RowBackground colour set for the entire Grid and then set the row background for a column depending on the data being displayed.
<DataGrid TabIndex="8" x:Name="fg" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="4" Margin="5" RowHeaderWidth="0" ContextMenu="{StaticResource menuContext}"
ItemsSource="{Binding AssetPPM2GridEntityCollection}" ColumnHeaderStyle="{StaticResource ColumnContextMenus}" HeadersVisibility="{Binding HeaderVisibility}"
SelectedIndex="{Binding GrdFgSelectedIndex}" AutoGenerateColumns="False" SelectionUnit="FullRow" SelectionMode="Extended"
EnableRowVirtualization="True" EnableColumnVirtualization="False" RowBackground="PapayaWhip"
VirtualizingPanel.VirtualizationMode="Standard" CanUserReorderColumns="False"
CanUserAddRows="False" GridLinesVisibility="Vertical" CanUserSortColumns="True" CanUserResizeColumns="False"
dp:DataGridMergeCellBehavior.IsMerged="{Binding Source={StaticResource assetPPM2ViewModel}, Path=IsMergeCellsChecked}"
PreviewMouseWheel="fg_PreviewMouseWheel">
GridLinesVisibility="Vertical"
should do the trick. Check if you are styling the cell to have borders. – Anand Murali