Removing all DataGrid row and cell borders
45,226
Solution 1
What about setting GridLinesVisibility="None"
?
<DataGrid GridLinesVisibility="None">
...
<DataGrid>
Solution 2
You could also do it this way
dataGrid.GridLinesVisibility = DataGridGridLinesVisibility.None;
Author by
diggingforfire
In my minds eye, I light fires in your cities Full stack developer, mostly Microsoft tech. Other interests include scifi/fantasy, silly japanese cartoons and listening to metal.
Updated on March 12, 2020Comments
-
diggingforfire about 4 years
I want to hide (or remove) all the borders of all the rows (and subsequently cells) in my datagrid, think a basic HTML table. I've looked all over and most questions seem to be about styling them and not hiding them.
I've already tried setting the BorderBrush and BorderThickness like so:
<DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> </Style> </DataGrid.RowStyle>
Tried the same for the CellStyle, but no dice, still seeing borders.