Hi Nisha,
Thanks for your reply.
I tried your solution, but the problem wasn't the fact that i couldn't get my newrow data, but it was duo to my sorting that my rowindex (of the newrow) was incorrect. I googled a while and found a solution:
rowindex = datatabel.DefaultView.Table.Rows.IndexOf(newrow);
int roIdx = datatabel.DefaultView.Find(nieuwerij["Code"]);
this.grid.CurrentCell.MoveTo(roIdx + 1, 0);
Though i would like to thank you for your help!
>Hi Gunther,
Thanks for th Updates.
Please try the code below in the CurrentCellValidating event handler, this will help you.
void gridDataBoundGrid1_CurrentCellValidating(object sender, CancelEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
GridBoundRecordState rs = this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(cc.RowIndex);
int pos = rs.Position;
CurrencyManager cm = rs.ListManager as CurrencyManager;
if (cm != null)
{
DataRowView drv = (DataRowView)cm.Current;
DataRow dr = (DataRow)drv.Row;
Console.WriteLine(dr[0].ToString());
Console.WriteLine("Current Position: {0}", cm.Position);
}
}
Let me know if you have any other questions.
Regards,
Nisha