I've found the support case that was raised in relation to this thread. Here's a summary:
The behavior is expected because these changes to the data source caused focus to be put elsewhere in the grid. The grid will scroll to bring the active cell/row into view.
As a solution, the above code for the AfterExitEditMode event handler was modified to save a reference to the originally-active row and to activate it again.
using Infragistics.Win.UltraWinGrid;....private void ultraGrid1_AfterExitEditMode(object sender, EventArgs e){ Random r = new Random(); ultraGrid1.ActiveRow.Cells["descrizione"].Value = "descrizione " + r.Next().ToString(); UltraGridRow row = ultraGrid1.ActiveRow; UltraGridRow getRow = ultraGrid1.ActiveRow; while (row.ParentRow != null) { row = row.ParentRow; DataRow dr = ((DataRowView)row.ListObject).Row; if (dr != null) dr["descrizione"] = "descrizione " + r.Next().ToString(); } getRow.Activate();}
base4it, does this help resolve your issue? If not, then I recommend that you submit a support reuqest and attach the sample you're mentioning.
Has this issue been fixed? We have a similar problem in our project. Our grid looks like this:
GirdParentRow
GridChildRow1
GridChildRow2
GridChildRow3
GridChildRow3 is the active row. Our code modifies the DataRow behind GridParentRow. After that GridChildRow1 gets selected. We can provide a sample project if needed.
Sample contains the two approach, modify by cell and datasouce.
Thank you - a sample will be very helpful for our research.
The support request hasn't been logged yet, so you can post the sample in this thread. The Options tab provides a way to attach the file.
ok thanks,
I have a sample project (vs2008, grid 2008.3) that reproduce the problem, if you want, I can send it.
I look forward to news.
thanks to you