How to delete a selected row using AllowDeleting in .NET MAUI DataGrid?
The .NET MAUI DataGrid provides support for deleting all selected rows by pressing the Delete key on the keyboard. To utilize this functionality, set the AllowDeleting
property to True
.
Refer to the example below, where the AllowDeleting
property is set to True:
XAML
This enables the capability to delete selected rows using the Delete key.
<syncfusion:SfDataGrid x:Name="datagrid"
ItemsSource="{Binding Employees}"
AllowDeleting="True">
</syncfusion:SfDataGrid>
C#
// Similar code as xaml
datagrid.AllowDeleting = true;
The following GIF demonstrates the deletion of all selected rows in the data grid.
Download the complete sample from GitHub.
Conclusion
I hope you enjoyed learning how to delete a selected row using AllowDeleting in .NET MAUI DataGrid
You can refer to our .NET MAUI DataGrid feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI DataGrid Documentation to understand how to present and manipulate data.
For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our .NET MAUI DataGrid and other .NET MAUI components.
Please let us know in the comments section if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!