Check that you have successfully assigned Command Name property.*Other opinion if you look more in details On Row Deleting event,if are you setting I just set up a very basic example with no problems.Open the web.config file and add your connectionstring: Now add a Sql Data Source control. For this example this should be: Now add a Grid View in your page.
You will set the following properties: These properties receive the name of the method that handles the corresponding operation.
It needs to be set to the item's primary key to uniquely identify the record to modify.
If you didn't set it, clicking Delete (or Edit) would cause a postback that doesn't affect anything since a Data Key wasn't associated with each Grid View row. Data Keys property page: When the Data Key Names property is set, the Grid View control automatically creates a Data Key object for each row in the control.
Now Inserting Data Using Grid View Footer: It requires few tricks to implement.
First we need to modify our Grid View code (make all columns as template column & add a new row into the Grid View Footer for insert) like: Where each column implemented under Template Column.
This tutorial series demonstrates basic aspects of using model binding with an ASP. Model binding makes data interaction more straight-forward than dealing with data source objects (such as Object Data Source or Sql Data Source).