The GridViewUpdateEventArgs is a class in the System.Web.UI.WebControls namespace of the .NET Framework library for C#. This class provides data for the RowUpdating event of the GridView control. It contains various properties that enable us to access the old and the new values of the editing row in the GridView control.
Example 1:
protected void gridview_RowUpdating(object sender, GridViewUpdateEventArgs e) { string oldName = e.OldValues["Name"].ToString(); string newName = e.NewValues["Name"].ToString(); // your code here }
In this example, we are accessing the old and new values of the "Name" field in the editing row of the GridView control and assigning them to string variables.
Example 2:
protected void gridview_RowUpdating(object sender, GridViewUpdateEventArgs e) { e.Cancel = true; // your code here }
In this example, we are canceling the RowUpdating event using the Cancel property of the GridViewUpdateEventArgs object in order to prevent the GridView control from updating the data source.
Package/library: System.Web.
C# (CSharp) GridViewUpdateEventArgs - 60 examples found. These are the top rated real world C# (CSharp) examples of GridViewUpdateEventArgs extracted from open source projects. You can rate examples to help us improve the quality of examples.