or
if (e.CurrentRow is GridViewNewRowInfo && this.DataSource != null) { DataRowView dataRowView = null; if (this.Rows.Count >= 1) { dataRowView = this.Rows[0].DataBoundItem as DataRowView; } }if (e.CurrentRow is GridViewNewRowInfo && attributesRadGridView.DataSource != null) { DataRowView dataRowView = null; if (attributesRadGridView.Rows.Count >= 1) { dataRowView = attributesRadGridView.Rows[attributesRadGridView.Rows.Count - 1].DataBoundItem as DataRowView; } }