I've got a GridView that I bind to a ObjectDataSource programmatically, like:
ObjectDataSource risks = new ObjectDataSource("Risks", "RetrieveProjectRisk");
risks.TypeName = "Promanto.ProjectRisks";
risks.DataObjectTypeName = "Promanto.ProjectRisk";
risks.SelectMethod = "RetrieveProjectRisk";
risks.DeleteMethod = "DeleteProjectRisk";
risks.InsertMethod = "AddProjectRisk";
risks.UpdateMethod = "UpdateProjectRisk";
risks.SelectParameters.Add("WhereClause", TypeCode.String, "ProjectID ='PR0002'");
RisksGrid.DataSource = risks;
RisksGrid.DataBind();
But when I click the edit button and I then update my values, I firstly get an error that RowUpdating should exist. When I add it, I'm not sure what to put in it. Isn't my UpdateMethod "UpdateProjectRisk" suppose to fire automatically?