We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Howto remove the vertical gridlines in the WPF version of SfDataGrid

I would like to remove the vertical gridlines in the WPF version of SfDataGrid. The examples I can find only allow you to remove all the gridlines by setting the borderbrush to transparent. However, I don't want to removes all the gridlines. I want to keep the horizontal grid lines (which would separate the records) but remove the vertical grid lines (which separate the columns). Is this possible?

Many thanks,

Ian

3 Replies

FP Farjana Parveen Ayubb Syncfusion Team July 19, 2019 05:29 AM UTC

Hi Lan, 
 
Thank you for using Syncfusion controls. 
 
We have analyzed your query, you can able to achieve your requirement, remove the vertical grid lines by customizing style for GridCell and GridHeaderCellControl.  
 
Please refer the below code example 
 
<Window.Resources> 
    <Style TargetType="syncfusion:GridCell"> 
        <Setter Property="BorderThickness" Value="0,0,0,1" /> 
    </Style> 
    <Style TargetType="syncfusion:GridHeaderCellControl"> 
        <Setter Property="BorderThickness" Value="0,0,0,1" /> 
    </Style> 
</Window.Resources> 
 
 
Please let us know whether this helps also if you need any further assistance on this. 
 
Regards, 
Farjana Parveen A 



IO Ian Ormesher July 19, 2019 07:22 AM UTC

Hi Farjana,

That's perfect! Exactly what I was looking for. 

Thank you.
Ian



FP Farjana Parveen Ayubb Syncfusion Team July 19, 2019 07:30 AM UTC

Hi Lan, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Farjana Parveen A 


Loader.
Live Chat Icon For mobile
Up arrow icon