Articles in this section
Category / Section

How to load Xamarin.Forms DataGrid without borders?

1 min read

Xamarin.Forms DataGrid allow you to load the grid cells without borders by writing a custom style derived from DataGridStyle. You need to override the GetGridLinesVisibility method to load the grid without borders.

The below code illustrates how to load the grid without borders.

<ContentPage.BindingContext>
  <local:ViewModel x:Name="viewModel"/>
</ContentPage.BindingContext>
<ContentPage.Content>
  <syncfusion:SfDataGrid x:Name="dataGrid"
                          ColumnSizer="Star"
                          AutoGenerateColumns="True"
                          ItemsSource="{Binding OrdersInfo}">
  </syncfusion:SfDataGrid>
</ContentPage.Content>

 

public class CustomGridStyle : DataGridStyle
{
    public CustomGridStyle()
    {
    }
    public override GridLinesVisibility GetGridLinesVisibility()
    {
        return GridLinesVisibility.None;
    }
}

 

On executing the above code the below output is obtained.

Table

 

Sample Link:

How to load grid without borders?


Conclusion

I hope you enjoyed learning about how to load Xamarin.Forms DataGrid without borders.


You can refer to our Xamarin.Forms feature tour page to learn about its other groundbreaking

feature representations and documentation, and how to quickly get started for configuration specifications.


For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied