How to set rounded corner for .NET MAUI DataGrid?
You can set the rounded corner for the .NET MAUI DataGrid(SfDataGrid) by loading the DataGrid in the Border.
XAML
Define the StrokeShape as RoundRectangle with CornerRadius as 10 for the border to apply rounded corners to the DataGrid.
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DataGridMAUI"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.DataGrid;assembly=Syncfusion.Maui.DataGrid"
x:Class="DataGridMAUI.MainPage">
<ContentPage.BindingContext>
<local:ViewModel x:Name="ViewModel"></local:ViewModel>
</ContentPage.BindingContext><Border Stroke="LightGray"
StrokeThickness="2"
StrokeShape="RoundRectangle 10,10,10,10" VerticalOptions="Start"
HorizontalOptions="Center">
<syncfusion:SfDataGrid x:Name="dataGrid" AutoGenerateColumnsMode="None" GridLinesVisibility="Both" HeaderGridLinesVisibility="Both" WidthRequest="300" HeightRequest="520" ItemsSource="{Binding OrderInfoCollection}" >
<syncfusion:SfDataGrid.Columns>
<syncfusion:DataGridNumericColumn MappingName="OrderID" Format="D">
</syncfusion:DataGridNumericColumn>
<syncfusion:DataGridTextColumn MappingName="Customer" HeaderText="Name"></syncfusion:DataGridTextColumn>
<syncfusion:DataGridTextColumn MappingName="Country"></syncfusion:DataGridTextColumn>
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
</Border></ContentPage>
Take a moment to pursue this documentation, where you will find more about Syncfusion .NET MAUI DataGrid(SfDataGrid) with code examples.
Please refer to this link to learn about the essential features of Syncfusion .NET MAUI DataGrid(SfDataGrid).
