{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "grid-inline-editing",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "Grid",
  "variant": "inline-editing",
  "dependencies": [
    "Syncfusion.AspNetMvc.Grid",
    "Syncfusion.AspNetMvc.DropDowns"
  ],
  "description": "Data grid supports inline adding, editing, deleting, and updating of row records.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/grid-inline-editing.md"
  },
  "files": [
    {
      "target": "src/components/grid-inline-editing/Grid.cshtml",
      "content": "@{\n    ViewData[\"Title\"] = \"InlineEditing\";\n}\n\n@using Syncfusion.EJ2\n@section ControlsSection{\n    <div class=\"col-lg-9 control-section\">\n        @Html.EJS().Grid(\"InlineEditing\").DataSource((IEnumerable<object>)ViewData[\"dataSource\"]).Columns(col =>\n   {\n\n       col.Field(\"OrderID\").HeaderText(\"Order ID\").IsPrimaryKey(true).Width(\"140\").ValidationRules(new { required = true, number = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();\n       col.Field(\"CustomerID\").HeaderText(\"Customer Name\").Width(\"150\").ValidationRules(new { required = true, minLength = 5 }).Add();\n       col.Field(\"Freight\").HeaderText(\"Freight\").Width(\"140\").EditType(\"numericedit\").ValidationRules(new { required = true, min = 0 }).Format(\"C2\").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();\n       col.Field(\"OrderDate\").HeaderText(\"Order Date\").EditType(\"datetimepickeredit\").Width(\"150\").Format(new { type = \"datetime\", format = \"M/d/y hh:mm a\" }).Add();\n       col.Field(\"ShipCountry\").HeaderText(\"Ship Country\").Width(\"150\").EditType(\"dropdownedit\").Add();\n       col.Field(\"Verified\").HeaderText(\"Verified\").EditType(\"booleanedit\").DisplayAsCheckBox(true).Type(\"boolean\").Width(\"150\").Add();\n\n   }).CssClass(\"e-css\").ActionBegin(\"actionBegin\").AllowPaging().PageSettings(page => page.PageCount(2)).AllowSorting().AllowFiltering().FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); }).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).ShowAddNewRow(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal); }).Toolbar(new List<string>() { \"Add\", \"Edit\", \"Delete\", \"Update\", \"Cancel\" }).Render()\n    </div>\n\n\n    <div class=\"col-lg-3 property-section\">\n        <table id=\"property\" title=\"Properties\" style=\"width: 100%\">\n            <tr>\n                <td style=\"width: 40%\">\n                    <div style=\"padding-top: 7px\">Add New Row Position</div>\n                </td>\n                <td style=\"width: 60%;padding-right: 10px\">\n                    <div id='typeddl'>\n                @Html.EJS().DropDownList(\"AddNewRowPosition\").DataSource((IEnumerable<object>)ViewData[\"ddData\"]).Value(\"Top\").Change(\"rowPositionChange\").Render()\n                    </div>\n                </td>\n            </tr>\n        </table>\n    </div>\n\n\n\n    <style>\n        #typeddl {\n            min-width: 100px;\n        }\n    </style>\n    <script>\n        function rowPositionChange(args) {\n            var grid = document.getElementById(\"InlineEditing\").ej2_instances[0];\n            grid.editSettings.newRowPosition = this.value;\n            grid.refresh();\n        }\n        function actionBegin(args) {\n            var grid = document.getElementById(\"InlineEditing\").ej2_instances[0];\n            if (args.requestType === 'save') {\n                if (grid.pageSettings.currentPage !== 1 && grid.editSettings.newRowPosition === 'Top') {\n                    args.index = (grid.pageSettings.currentPage * grid.pageSettings.pageSize) - grid.pageSettings.pageSize;\n                } else if (grid.editSettings.newRowPosition === 'Bottom') {\n                    args.index = (grid.pageSettings.currentPage * grid.pageSettings.pageSize) - 1;\n                }\n            }\n        }\n    </Script >\n}\n"
    },
    {
      "target": "src/components/grid-inline-editing/GridController.cs",
      "content": "using EJ2MVCSampleBrowser.Models;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\n\nnamespace EJ2MVCSampleBrowser.Models\n{\n    public class OrdersDetails\n{\n    public int OrderID;\n    public string CustomerID;\n    public double Freight;\n    public DateTime OrderDate;\n    public string ShipCountry;\n    public bool Verified;\n    public static List<OrdersDetails> GetAllRecords()\n    {\n        DateTime baseDate = new DateTime(2024, 1, 1);\n        return new List<OrdersDetails>\n        {\n            new OrdersDetails { OrderID = 1001, CustomerID = \"ALFKI\", Freight = 32.38, OrderDate = baseDate,             ShipCountry = \"Germany\",   Verified = true  },\n            new OrdersDetails { OrderID = 1002, CustomerID = \"ANATR\", Freight = 11.61, OrderDate = baseDate.AddDays(1),  ShipCountry = \"Spain\",     Verified = true  },\n            new OrdersDetails { OrderID = 1003, CustomerID = \"ANTON\", Freight = 65.83, OrderDate = baseDate.AddDays(2),  ShipCountry = \"Germany\",   Verified = false },\n            new OrdersDetails { OrderID = 1004, CustomerID = \"AROUT\", Freight = 25.62, OrderDate = baseDate.AddDays(3),  ShipCountry = \"France\",    Verified = true  },\n            new OrdersDetails { OrderID = 1005, CustomerID = \"BERGS\", Freight = 51.30, OrderDate = baseDate.AddDays(4),  ShipCountry = \"Sweden\",    Verified = false },\n            new OrdersDetails { OrderID = 1006, CustomerID = \"BLAUS\", Freight = 58.17, OrderDate = baseDate.AddDays(5),  ShipCountry = \"Germany\",   Verified = true  },\n            new OrdersDetails { OrderID = 1007, CustomerID = \"BOLID\", Freight = 12.09, OrderDate = baseDate.AddDays(6),  ShipCountry = \"Spain\",     Verified = true  },\n            new OrdersDetails { OrderID = 1008, CustomerID = \"CACTU\", Freight = 32.98, OrderDate = baseDate.AddDays(7),  ShipCountry = \"Argentina\", Verified = false },\n            new OrdersDetails { OrderID = 1009, CustomerID = \"CENTC\", Freight = 41.34, OrderDate = baseDate.AddDays(8),  ShipCountry = \"France\",    Verified = true  },\n            new OrdersDetails { OrderID = 1010, CustomerID = \"CHOPS\", Freight = 22.98, OrderDate = baseDate.AddDays(9),  ShipCountry = \"Switzerland\", Verified = true }\n        };\n    }\n}\n}\n\nnamespace EJ2MVCSampleBrowser.Controllers.Grid\n{\n    public partial class GridController : Controller\n    {\n        // GET: InlineEditing\n        public ActionResult InlineEditing()\n        {\n            var order = OrdersDetails.GetAllRecords();\n            ViewData[\"datasource\"] = order;\n            ViewData[\"ddData\"] = new string[] { \"Top\", \"Bottom\" };\n            return View(\"~/Views/Home/grid/inline-editing/Grid.cshtml\");\n        }\n    }\n}"
    }
  ]
}