# grid-inline-editing

> Data grid supports inline adding, editing, deleting, and updating of row records.

**Framework:** aspnet-core  **Component:** Grid  **Variant:** inline-editing

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/aspnet-core/grid-inline-editing.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.AspNetCore.Grid
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/grid-inline-editing/grid.cshtml

```cshtml
@page
@namespace aspnet_core.Grid.InlineEditing
@model EJ2CoreSampleBrowser.Grid.InlineEditing.InlineEditingModel
@using Syncfusion.EJ2
@using Syncfusion.EJ2.Grids

    <div class="control-section">
        <div class="content-wrapper">
            <div class="row">
                <ejs-grid id="Grid" dataSource="@Model.Orders" allowPaging="true"
                          toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" width="100%">
                    <e-grid-columns>
                        <e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" width="120" textAlign="Right"></e-grid-column>
                        <e-grid-column field="CustomerID" headerText="Customer ID" width="160"></e-grid-column>
                        <e-grid-column field="Freight" headerText="Freight" format="C2" editType="NumericEdit" width="120" textAlign="Right"></e-grid-column>
                        <e-grid-column field="ShipCity" headerText="Ship City" width="160"></e-grid-column>
                        <e-grid-column field="ShipCountry" headerText="Ship Country" width="180"></e-grid-column>
                    </e-grid-columns>
                    <e-grid-pagesettings pageCount="8"></e-grid-pagesettings>
                    <e-grid-editSettings allowAdding="true" allowEditing="true" allowDeleting="true" mode="Normal"></e-grid-editSettings>
                </ejs-grid>
            </div>
        </div>
    </div>

```

### src/components/grid-inline-editing/grid.cshtml.cs

```cs
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace EJ2CoreSampleBrowser.Grid.InlineEditing
{
    public class InlineEditingModel : PageModel
    {
        public List<OrderRecord> Orders { get; set; }

        public void OnGet()
        {
            Orders = new List<OrderRecord>
            {
                new OrderRecord { OrderID = 1,  CustomerID = "AA-001", Freight = 12.50, ShipCity = "CityA", ShipCountry = "Country1" },
                new OrderRecord { OrderID = 2,  CustomerID = "AA-002", Freight = 24.00, ShipCity = "CityB", ShipCountry = "Country1" },
                new OrderRecord { OrderID = 3,  CustomerID = "AA-003", Freight = 6.75,  ShipCity = "CityC", ShipCountry = "Country2" },
                new OrderRecord { OrderID = 4,  CustomerID = "AA-004", Freight = 18.90, ShipCity = "CityD", ShipCountry = "Country2" },
                new OrderRecord { OrderID = 5,  CustomerID = "AA-005", Freight = 42.10, ShipCity = "CityE", ShipCountry = "Country3" },
                new OrderRecord { OrderID = 6,  CustomerID = "AA-006", Freight = 9.50,  ShipCity = "CityF", ShipCountry = "Country3" },
            };
        }
    }

    public class OrderRecord
    {
        public int OrderID { get; set; }
        public string CustomerID { get; set; }
        public double Freight { get; set; }
        public string ShipCity { get; set; }
        public string ShipCountry { get; set; }
    }
}

```
