G
Guest
I have added an auto scroll feature to my DataGrid control like this:
private void DoAutoScroll()
{
DataView dv = m_DataGrid.DataSource as DataView;
DataGridCell cell = m_DataGrid.CurrentCell;
cell.RowNumber = dv.Count;
m_DataGrid.CurrentCell = cell;
}
But this the last line of this code is putting the focus on the current
cell, and it steal the focus from other control that uses the focus.
How can I still make have the auto scroll feature without stilling the focus?
If I new how has the focus before I call to the above DoAutoScroll(), then I
could give the focuses back.
private void DoAutoScroll()
{
DataView dv = m_DataGrid.DataSource as DataView;
DataGridCell cell = m_DataGrid.CurrentCell;
cell.RowNumber = dv.Count;
m_DataGrid.CurrentCell = cell;
}
But this the last line of this code is putting the focus on the current
cell, and it steal the focus from other control that uses the focus.
How can I still make have the auto scroll feature without stilling the focus?
If I new how has the focus before I call to the above DoAutoScroll(), then I
could give the focuses back.