You need to include the Grid View Command Field column to add Edit, Update and Cancel Buttons in the Grid View. You need to include Template Field for every column you want to provide Editing because Template Field provides you both Item Template and Edit Item Template to create interface for two separate Grid View modes. You need to handle Grid View events such as Row Editing, Row Canceling Edit and Row Updating to provide desired editing functionality.
When the client syncs the changes to the server, the server first makes the appropriate changes to the spreadsheet and then saves the updated spreadsheet.The App Sheet server then checks whether any workflow rules should be triggered.A workflow rule is triggered when the table you specify in the workflow rule is changed.Listing 1, page 20, shows a stored procedure that inserts an employee record into the Northwind database's Employees table and returns the identity field of Employee ID as an output parameter.The most important point to notice about this stored procedure is the use of the SCOPE_IDENTITY() function, which retrieves the identity value SQL Server assigns, then sets that value into the @Identity variable that the stored procedure returns.
You can use an output parameter of a stored procedure that performs the insert action, or you can use the Sql Data Adapter object's Row Updated method.