private void afficherLesEntêtesToolStripMenuItem_Click(object sender, EventArgs e) { if (m_dgv.DataSource == null) { return; } m_dgv.ColumnHeadersVisible = !m_dgv.ColumnHeadersVisible; ActualiserTextMenu(); if (Parent != null && Parent.GetType() == typeof(CControlValeurCAVOO)) { CControlValeurCAVOO ctrlValeur = (CControlValeurCAVOO)Parent; ctrlValeur.MustBeRedraw = true; if (ctrlValeur.Parent != null && ctrlValeur.Parent.GetType() == typeof(CDataGridViewControleVivant)) { CDataGridViewControleVivant dgvCtrl = (CDataGridViewControleVivant)ctrlValeur.Parent; if (m_dgv.ColumnHeadersVisible) { dgvCtrl.EditingControlDataGridView.CurrentRow.Height += m_dgv.ColumnHeadersHeight + 1; } else { dgvCtrl.EditingControlDataGridView.CurrentRow.Height -= m_dgv.ColumnHeadersHeight + 1; } } } }
private void SignalerRedraw() { if (Parent != null && Parent.GetType() == typeof(CControlValeurCAVOO)) { CControlValeurCAVOO ctrlValeur = (CControlValeurCAVOO)Parent; ctrlValeur.MustBeRedraw = true; } }