Hi, I have do some test.
When user modify cell, and click enter, the application modify some others fields of same and parent row on datasource (dataset).
This seems to be the cause of the problem. I have made a test project which reproduce the problem.
this code are the core for me for reproduce the problem:
{
}
ultraGrid1.ActiveRow.Cells["descrizione"].Value = "descrizione " + r.Next().ToString();
row = row.ParentRow;
if (dr != null)
thank you very much
Test what happens by replacing your second line with the following:
GridPrev.PerformAction(UltraGridAction.ExitEditMode);
You may also need to move this to before the CommitRow action.
If this doesn't resolve the issue, then this will likely take some in-depth research, at which point I'll pass this information to a Developer Support Engineer to pursue as part of a support request.
Hi Vince,
In grid I handle the enter key keypress with this code:
GridPrev.ActiveCell.EditorResolved.ExitEditMode(true, true);
This code allow to commit row (hide the little pen on row selector) and exit from edit mode on cell.
In debug I have try to comment, without behaviour changes grid scrol always up, one of this but i need both.
If I comment both CommitRow and ExitEditMode, grid has correct behaviour.
help me please, I don't understant.
This doesn't sound like correct behavior to me.
My first thought is that your application may be doing something that causes the grid to scroll upward as a side effect. Possible such causes include resetting the grid's data source, doing anything that causes a Reset notification to be set through the Windows Forms binding manager, or explicitly programmatically scrolling the grid.
Can you provide more information as to what kind of object your grid is bound to (DataSet, custom collection, generic collection, etc.), and which of the grid's events you have handled?