1

I have followed this link (demos.shieldui.com/aspnetcore/grid-editing/inline-editing) for editing data in shieldUI grid-inline editing for my ASP.NET Core web application (not MVC). That article was not fully helpful for me to update delete and insert data into the SQL Server database because program manages to view data through a javascript mentioned below.

<script>
    var gridData =
        [

                @{

                    foreach (var Emp in Model.EmployeeList)
                    {
                        int Eid = Emp.Id;
                        string NIC = Emp.NicNo;
                        string ename = Emp.Name;

                        @:{ "Name": "@ename","ID": "@Eid","NIC": "@NIC"},

                    }
                }



        ]

</script>

but the article mentioned about another way for the data source in inline editing. How can I edit, delete, insert the data through the JavaScript to SQL DB?

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

0

You can have a look at that link (https://demos.shieldui.com/aspnetcore/grid-editing/inline-editing).

  1. Read data - You have read method where you should place the url of your read action of the controller. In that action you should have your data extracted from the database and pass it to be displayed in the grid.
  2. add - You receive the newly created record in your add action of the controller, you should use it and create a new record in the database with the received data.
  3. update - You have update method where you should place your update action of the controller. You receive the updated record as a parameter and then you should update it in the database. 4) remove - You receive the id of the deleted record in your remove action, therefore you should delete that record in the database.
halfer
  • 19,824
  • 17
  • 99
  • 186
lyub35
  • 300
  • 1
  • 5