//Собственно сам обработчик
private void keydown(object sender, KeyEventArgs e)
{
var type = sender.GetType();
if (e.Control && e.KeyCode == Keys.C)
{
if (type == typeof(TextBox))
{
textBox2.Text = (sender as TextBox).SelectedText;
}
if (type == typeof(RichTextBox))
{
textBox2.Text = (sender as RichTextBox).SelectedText;
}
}
}
private void gridView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
var view = sender as GridView;
if (view != null)
{
MessageBox.Show(view[0,0].ToString());
}
}