| 分類:[C#]
何がしたいのかよく見えてないので外しているかもしれませんが、 overrideしたOnPreviewKeyDown中の、ColumnIndexをインクリメントする 直前で、その行が最下行かどうかの判断をするのじゃだめでしょうか?
grid.CurrentCell = grid[grid.CurrentCell.ColumnIndex + 1, grid.CurrentCell.RowIndex]; return;
となってるところを、 if (grid.CurrentCell.RowIndex != grid.RowCount - 1) { grid.CurrentCell = grid[grid.CurrentCell.ColumnIndex + 1,grid.CurrentCell.RowIndex]; return; } みたいな。
|