This repository demonstrates how to implement cascading dropdown editors with remote data binding inside an ASP.NET Core DataGrid during inline editing scenarios.
This sample project shows how to configure the Syncfusion ASP.NET Core DataGrid to support cascading DropDownList components when editing grid rows. The primary use case is handling dependent fields such as Country and State, where the available options in one dropdown depend on the selected value of another.
The grid is configured with inline CRUD operations and retrieves its dropdown data from remote endpoints using the UrlAdaptor. JavaScript editor lifecycle methods (create, read, write, and destroy) are used to fully control the behavior of each dropdown editor.
- Inline editing with Add, Edit, Delete, Update, and Cancel actions
- Cascading dropdown editors inside grid columns
- Remote data loading using DataManager and UrlAdaptor
- Dynamic filtering of dependent dropdown values
- Clean separation of grid configuration and editor logic
- ASP.NET Core MVC
- Syncfusion EJ2 ASP.NET Core DataGrid
- JavaScript (EJ2 DropDownList components)
- Remote data binding using Web API endpoints
- Visual Studio 2022
- .NET SDK compatible with ASP.NET Core
- Syncfusion EJ2 ASP.NET Core packages
When a country is selected in the ShipCountry column, the ShipCity dropdown is enabled and filtered dynamically using a query based on the selected country ID. The state dropdown remains disabled until a valid country selection is made, ensuring proper cascading behavior.
- Clone or download the repository to your local machine.
git clone <repo_link>
- Open the solution file in Visual Studio 2022.
- Restore NuGet packages by rebuilding the solution.
- Run the project and navigate to the home page to view the grid.
Use the toolbar buttons to add or edit a record. Select a country first, then choose the corresponding state from the filtered dropdown list.