Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As you can see in the picture around Jesse Furher has a black border line, how can i remove that line for all cells?

<img src='http://www.picz.ro/thumbnails/e74aed009a3f8c741e40db819509a77e.png' alt='Image Hosting' border='0'>

XML
<DataGrid SelectionUnit="FullRow" SelectionMode="Extended"  ItemsSource="{Binding Path=DataClienti}" AutoGenerateColumns="False" Height="257" Margin="11,34,114,0" Name="dataGrid1" VerticalAlignment="Top" DataContext="{Binding}" IsSynchronizedWithCurrentItem="True" GridLinesVisibility="Horizontal">

                    <DataGrid.Columns>
                        <DataGridTextColumn Width="60" IsReadOnly="True"  Header="Nr. crt" Binding="{Binding Id}" SortDirection="Descending"></DataGridTextColumn>
                        <DataGridTextColumn Width="0.3*" IsReadOnly="True" Header="Nume Client" Binding="{Binding NumeClient}"></DataGridTextColumn>
                        <DataGridTextColumn Width="0.3*" IsReadOnly="True" Header="Tip Utilaj" Binding="{Binding TipUtilaj}"></DataGridTextColumn>
                        <DataGridTextColumn Width="0.3*" IsReadOnly="True" Header="Telefon" Binding="{Binding Telefon}"></DataGridTextColumn>
                        <DataGridTextColumn Width="0.3*" IsReadOnly="True" Header="Mecanic" Binding="{Binding Mecanic}"></DataGridTextColumn>
                        <DataGridTextColumn Width="0.2*" IsReadOnly="True" Header="Cost" Binding="{Binding Cost}"></DataGridTextColumn>
                    </DataGrid.Columns>
                </DataGrid>
Posted
Updated 22-Jul-12 3:38am
v3
Comments
woutercx 22-Jul-12 9:35am    
I can't solve it if you don't show the XAML...
Kenneth Haugland 22-Jul-12 9:45am    
Add a style that targets DataGridCell and set some of the boundaries to 0 or nothing or something like that....

You could take a look at these properties:

http://blogs.msdn.com/b/jaimer/archive/2009/01/20/styling-microsoft-s-wpf-datagrid.aspx[^]

if that doesn't work, you would have to modify the default template for the DataGrid, but it's rather advanced..

http://social.msdn.microsoft.com/Forums/en/wpf/thread/8e6f3c70-f65f-4152-9469-9ae3e9239126[^]

http://msdn.microsoft.com/en-us/library/cc278066(v=VS.95).aspx[^]
 
Share this answer
 
v2
<datagrid.cellstyle>

                       <style targettype="DataGridCell">

                           <style.triggers>

                               <trigger property="IsSelected" value="True">

                                   <setter property="BorderThickness" value="0" />

                               </trigger>

                           </style.triggers>

                       </style>
 </datagrid.cellstyle>


after i saw the examples i realized that i can create a setter on the property isselected and this solved my GUI problem
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900