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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to modify the cell borders in SfDataGrid ?

SfDataGrid allows you to customize the grid borders to vertical, horizontal, both or none based on requirements.

You need to write a custom SfDataGrid.GridStyle and override the GetGridLinesVisibility method to customize the borders in SfDataGrid.

Refer the below code example in which a CustomGridStyle is written inheriting from DataGridStyle to customize the grid borders.

 

MainPage

 

There are four options available in GridLinesVisibility to customize the grid borders.

Both

GridLinesVisibility.Both allows you to display the SfDataGrid with both Horizontal and Vertical borders.

 

Screenshot

Horizontal

GridLinesVisibility.Horizontal allows you to display the SfDataGrid with Horizontal border only.

 

Screenshot:

Vertical

GridLinesVisibility.Vertical allows you to display the SfDataGrid with Vertical border only.

 

Screenshot

None

GridLinesVisibility.None allows you to display the SfDataGrid without borders.

 

Screenshot

Sample Link: How to modify the cell borders in SfDataGrid ?

 

 

 

Article ID: Published Date: Last Revised Date: Platform: Control: Product Version:
7803 06/30/2017 07/26/2017 Xamarin.Forms SfDataGrid 13.4.0.53
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon 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.Close Icon