Documentation for this section has not yet been entered.
The row index is zero-based (the first row is row zero).
This property is typically used only in the following scenarios, which involve handlers for specific events:
You want the System.Web.UI.WebControls.GridView control to open in edit mode for a specific row the first time that the page is displayed. To do this, you can set the GridView.EditIndex property in the handler for the System.Web.UI.Control.Load event of the System.Web.UI.Page class or of the System.Web.UI.WebControls.GridView control.
You want to know which row was edited after the row was updated. To do this, you can retrieve the row index from the GridView.EditIndex property in the GridView.RowUpdated event handler.
You are binding the System.Web.UI.WebControls.GridView control to a data source by setting the BaseDataBoundControl.DataSource property programmatically. In this case you must set the GridView.EditIndex property in the GridView.RowEditing and GridView.RowCancelingEdit event handlers.
If you set the GridView.EditIndex property after a postback or in handlers for events that are raised later than the System.Web.UI.Control.Load event, the System.Web.UI.WebControls.GridView control might not enter edit mode for the specified row. If you read the value of this property in other event handlers, the index is not guaranteed to reflect the row that is being edited.
To determine which row the user has clicked an Edit button or hyperlink in before the System.Web.UI.WebControls.GridView control enters edit mode, you can retrieve the row index from the GridViewEditEventArgs.NewEditIndex property of the System.Web.UI.WebControls.GridViewEditEventArgs object in the GridView.RowEditing event handler.
To prevent the System.Web.UI.WebControls.GridView control from entering edit mode after a user has clicked an Edit button or hyperlink, set the System.ComponentModel.CancelEventArgs.Cancel property of the System.Web.UI.WebControls.GridViewEditEventArgs object to true in the GridView.RowEditing event handler.