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.
Unfortunately, activation email could not send to your email. Please try again.

How to change the grid line color?

The SfDataGrid provides an option to customize the Grid line color. By default, the grid line color is shown in a Gray color. But, you can customize the grid line color by customizing style for the Cells in the SfDataGrid (GridCell, GridHeaderCell, GridCaptionSummaryCell, GridTableSummaryCell, GridHeaderIndentCell, GridIndentCell, GridStackedHeaderCellControl, GridGroupSummaryCell).

 In each cell the Grid lines are drawn at Right and Bottom position only. Each cells Grid line color is based on the BorderBrush property of the Cell.

Refer to the following code example where the BorderBrush property is changed to customize the line color.

XAML

Refer to the screenshot where the SfDataGrid is loaded with customized grid line color.

C:\Users\jayapradha\Desktop\Gridlines\grid line color.PNG

Refer to the following screenshot with the customized gridline color while grouping.

 

Sample Links:

WPF

WRT

SilverLight

UWP

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
6118 01/25/2016 01/25/2016 UWP SfDataGrid 4.5 12.1.0.43
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.