[C#] 纯文本查看 复制代码 void GridView_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == (Keys.Control | Keys.C))
{
GridView view = sender as GridView;
if (view != null && !view.IsEditing)
{
string val = view.GetFocusedDisplayText();
if (!string.IsNullOrEmpty(val))
{
Clipboard.SetText(val);
e.Handled = true;
}
}
}
} |