Skip to content

This sample demonstrates how to use the EditTemplate feature in Syncfusion Blazor DataGrid when the Grid is bound to a DynamicObject.

Notifications You must be signed in to change notification settings

SyncfusionExamples/DynamicObject-data-binding-with-EditTemplate-in-Blazor-DataGrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DynamicObject-data-binding-with-EditTemplate-in-Blazor-DataGrid

This sample demonstrates how to bind a Syncfusion Blazor DataGrid to a DynamicObject and use the EditTemplate feature for editing fields like dropdowns dynamically.

Overview

In this example:

  • The DataGrid is bound to a list of dynamic objects (OrdersDetails inherits from DynamicObject).
  • A custom EditTemplate is used to render a dropdown (SfComboBox) in the Account column.
  • Changes made via the dropdown are captured and updated using the RowUpdating event.
  • Dynamic member access and mutation is implemented via TryGetMember and TrySetMember.

Getting Started

Prerequisites

Project Setup

  1. Clone the repository:

    git clone https://github.com/SyncfusionExamples/DynamicObject-data-binding-with-EditTemplate-in-Blazor-DataGrid.git
  2. Navigate to the project folder:

    cd DynamicObject-data-binding-with-EditTemplate-in-Blazor-DataGrid
  3. Restore the NuGet packages:

    dotnet restore
  4. Build and run the application:

    dotnet run
  5. Open the browser at https://localhost:port (port varies).

About

This sample demonstrates how to use the EditTemplate feature in Syncfusion Blazor DataGrid when the Grid is bound to a DynamicObject.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •