среда, 30 октября 2013 г.

C# DataGridView select row by right mouse button click



private void dgv_MouseDown(object sender, MouseEventArgs e)
{
    DataGridView.HitTestInfo Hti;

    if (e.Button == MouseButtons.Right)
    {
        Hti = dgv.HitTest(e.X, e.Y);

        if (Hti.Type == DataGridViewHitTestType.Cell)
        {
            if (!((DataGridViewRow)(dgv.Rows[Hti.RowIndex])).Selected)
            {
                dgv.ClearSelection();
                ((DataGridViewRow)dgv.Rows[Hti.RowIndex]).Selected = true;
            }
        }
    }
}

Docker. Первые контейнеры

Источник:  php.dragomano.ru Структура каталогов: ~/develop/web/project/                  nginx/      - сервис web-сервера                php...