These one relevant are defined: * rowremoved * rowsinserted * rowupdated * refresh But only refresh fires on addition of a new record into an empty grid, but it fires on any other occasion as well.
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.
Editor's Note: This article is adapted from Chapter 29 of Michael Otey's book ADO.
NET: The Complete Reference (Osborne/Mc Graw-Hill, 2003) SQL Server's IDENTITY columns let SQL Server automatically assign unique values to table rows.
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.
Font-Names="Verdana" Font-Size="10" Data Key Names="Product ID" Auto Generate Columns="false" onrowcancelingedit="Grid View1_Row Canceling Edit" onrowediting="Grid View1_Row Editing" onrowupdating="Grid View1_Row Updating"In the above code, I set two properties Show Edit Button and Show Cancel Button of Command Field.You can further restrict when a workflow rule is triggered by specifying the type of update that triggers the workflow rule.For example: Changes you make directly to the spreadsheet do not go through the App Sheet server, so they do not trigger the App Sheet workflow rules.Here's some code that needs to retrieve a Pk of one of the bound items and then perform some work on the data (in this case the business object): This seems like a lot of code to have to write just to retrieve data context.The code first has to retrieve the Grid View Row, which is done by retrieving the Command Argument which in this case a row index of the rendered grid view items.The App Sheet server then checks whether any workflow rules should be triggered.