public RowEventArgs( GridViewRow row ) { if ( row != null ) { RowIndex = row.RowIndex; Grid grid = ( row.Parent.Parent as Grid ); if ( grid.DataKeyNames.Length > 0 && grid.DataKeys.Count > row.RowIndex ) { RowKeyValue = grid.DataKeys[row.RowIndex].Value; RowKeyValues = grid.DataKeys[row.RowIndex].Values; } } else { RowIndex = -1; } }