I was able to avoid this problem in expandgrid by handling these two events.
bool processedValidating = false;
private void gridDataBoundGrid1_CurrentCellValidated(object sender, System.EventArgs e)
{
processedValidating = true;
}
private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
if(processedValidating)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
int row = cc.MoveFromRowIndex;
if(this.gridDataBoundGrid1.IsExpandedAtRowIndex(row))
{
GridBoundRecordState rs = this.gridBinder.GetRecordStateAtRowIndex(row);
if(rs.LevelIndex == 0 &&
this.gridBinder.NameToColIndex("CategoryID") == cc.MoveFromColIndex)
{
this.gridDataBoundGrid1.BeginUpdate();
this.gridDataBoundGrid1.CollapseAtRowIndex(row);
this.gridDataBoundGrid1.ExpandAtRowIndex(row);
this.gridDataBoundGrid1.EndUpdate();
}
}
}
processedValidating = false;
}