鉴于DataGridViewCell Cell = DataGridView.CurrentCell;
,如何选择Cell
中的所有文字?
答案 0 :(得分:3)
有一种BeginEdit方法可以编辑CurrentCell并选择其文本:
// Update CurrentCell to the provided Cell
// Can be skipped if Cell is actually the CurrentCell
Cell.DataGridView.CurrentCell = Cell;
// Change the grid's CurrentCell to edit mode and select text
Cell.DataGridView.BeginEdit(true);