Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Master Bulk Editing in .NET MAUI DataGrid

This demo shows Master Bulk Editing in .NET MAUI DataGrid.


Introduction

Modern applications often require powerful data manipulation capabilities to handle large datasets efficiently. The Syncfusion .NET MAUI DataGrid provides advanced editing features that allow developers to create interactive, user-friendly, and high-performance data grids across Android, iOS, Windows, and macOS.

In this blog, we’ll explore Master Bulk Editing in .NET MAUI DataGrid, including bulk editing, custom editors, and validation techniques.


What is Bulk Column Editing?

Bulk editing enables users to apply changes to multiple cells in a column simultaneously. For example:

  • Update the status of all selected rows.
  • Apply a discount to multiple products.
  • Change category for a batch of items.

Powerful Capabilities of Bulk Editing

  • Multi-Column Selection: Select multiple columns for simultaneous edits.
  • Custom Editors: Use templates for specialized input fields.
  • Validation Support: Ensure data integrity during bulk updates.
  • Command Integration: Hook into BeginEdit, CommitEdit, and EndEdit for controlled workflows.

Bulk Edit with Popup

<Grid RowDefinitions="Auto,*" Padding="16" Spacing="12">
    <HorizontalStackLayout Spacing="12" VerticalOptions="Start" Margin="8,0,0,8">
    <Label Text="Selection Mode:" VerticalTextAlignment="Center"/>
    <Picker WidthRequest="180" HeightRequest="50" SelectedItem="{Binding SelectedSelectionMode, Mode=TwoWay}">
        <Picker.ItemsSource>
            <x:Array Type="{x:Type x:String}">
                <x:String>Cell</x:String>
                <x:String>Row</x:String>
            </x:Array>
        </Picker.ItemsSource>
    </Picker>
    </HorizontalStack>

    <!-- DataGrid with multiple selection -->
    <sfgrid:SfDataGrid Grid.Row="1"
                       x:Name="dataGrid"
                       ItemsSource="{Binding Orders}"
                       SelectionMode="Multiple"
                       AllowEditing="True" />   
    <sfPopupLayout x:Name="bulkEditPopup"
               IsOpen="{Binding IsBulkPopupOpen}"
               PopupViewHeight="200"
               PopupViewWidth="300"
               HeaderTitle="Bulk Edit"
               ShowCloseButton="True">
    <VerticalStackLayout Padding="12" Spacing="8">
        <Label Text="{Binding TargetMappingName}" FontAttributes="Bold" />

        <!-- Entry for text-based columns -->
        <Entry Placeholder="Enter value"
               IsVisible="{Binding IsStatusEditing, Converter={StaticResource BoolInverseConverter}}"
               Text="{Binding BulkEditValue}" />

        <!-- Picker for Status column -->
        <Picker ItemsSource="{Binding StatusOptions}"
                IsVisible="{Binding IsStatusEditing}"
                SelectedItem="{Binding SelectedStatus}" />

        <!-- Action buttons -->
        <HorizontalStackLayout Spacing="8">
            <Button Text="Apply" Command="{Binding ApplyBulkEditCommand}" />
            <Button Text="Cancel" Command="{Binding CancelBulkEditCommand}" />
        </HorizontalStackLayout>
    </VerticalStackLayout>
</sfPopupLayout>

✅ What This Does:

  • HeaderTitle: Displays "Bulk Edit".
  • Dynamic UI: Switches between Entry and Picker based on IsStatusEditing.
  • Bindings: Uses BulkEditValue for text edits and SelectedStatus for status updates.
  • Selection Modes: Cell Mode: Applies changes to one column across selected cells. Row Mode: Allows editing all fields for selected rows.

Bulk Editing

Conclusion

Thanks for reading! In this blog, we’ve seen Master Bulk Editing in .NET MAUI DataGrid. Check out our Release Notes and What’s New pages to see the other updates in this release and leave your feedback in the comments section below. For current Syncfusion customers, the newest version of Essential Studio is available from the license and downloads page. If you are not yet a customer, you can try our 30-day free trial to check out these new features. For questions, you can contact us through our support forums, feedback portal, or support portal. We are always happy to assist you!

Troubleshooting

Path Too Long Exception

If you are facing a path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

For a step-by-step procedure, refer to the link.

About

This demo showcases how to implement bulk editing in the .NET MAUI DataGrid using Syncfusion controls. Learn how to update multiple rows simultaneously, apply batch operations efficiently, and maintain data integrity with MVVM architecture for cross-platform apps.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages