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

How to modify the cell borders in SfDataGrid ?

Platform: Xamarin.Forms |
Control: SfDataGrid |
Product Version:
Tags: styling, border,

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.




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


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




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




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




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



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




2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile