1) In most grid's that have this auto AddNew row, the row gets added as you type the first character on the last (or as the cell on the last row goes into edit mode). If you add the row at this point, you will not have this problem. So, this event handler will work.
private void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
if(cc.RowIndex == this.gridControl1.RowCount)
{
this.gridControl1.RowCount++;
this.gridControl1[this.gridControl1.RowCount, 1].Text = "DefaultValue1";
this.gridControl1[this.gridControl1.RowCount, 2].Text = "DefaultValue2";
}
}
But if you want to add the new row as you end the editing on the first cell in the last row, you do run into this problem. In this case, you can avoid the problem by locking the currentcell as you add the row.
private void gridControl1_CurrentCellEditingComplete(object sender, System.EventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
if(cc.RowIndex == this.gridControl1.RowCount)
{
cc.Lock();
this.gridControl1.RowCount++;
cc.Unlock();
this.gridControl1[this.gridControl1.RowCount, 1].Text = "DefaultValue1";
this.gridControl1[this.gridControl1.RowCount, 2].Text = "DefaultValue2";
}
}
2) I don't have an answer for your second question. From our point of view, we want the set of events to be rich enough that there is an appropriate one available to allow you to do the tasks you need to get done. And, if we miss one, we will try to add it if at all reasonable/possible.