Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing all DataGrid row and cell borders

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.

like image 550
diggingforfire Avatar asked Jan 10 '12 21:01

diggingforfire


1 Answers

What about setting GridLinesVisibility="None"?

<DataGrid GridLinesVisibility="None">     ... <DataGrid> 
like image 65
Adi Lester Avatar answered Sep 22 '22 00:09

Adi Lester