How to load Xamarin.Forms DataGrid without borders?
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.
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
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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!