摘要:
操作数据之后,往往需要刷新DataGridView, 可是滚动的位置会回到开头。让操作的人很不舒服。可以用下面的代码来解决int iScrollIndex = grdList.FirstDisplayedScrollingRowIndex;// 往grid里加数据...if (iScrollIndex >= 0 && iScrollIndex < grdList.RowCount){grdList.FirstDisplayedScrollingRowIndex = iScrollIndex;} 阅读全文