Esempio n. 1
0
 private void CarregarDgv()
 {
     try
     {
         dgvCadastro.DataSource         = projetoRepository.GetDataView();
         dgvCadastro.Columns[0].Visible = false;
         dgvCadastro.Columns[1].Visible = false;
         dgvCadastro.Columns[2].Visible = false;
         dgvCadastro.Columns[3].Width   = 150;
         dgvCadastro.Columns[4].DefaultCellStyle.Format = "c2";
         dgvCadastro.Columns[5].DefaultCellStyle.Format = "c2";
         dgvCadastro.Columns[6].Width  = 80;
         dgvCadastro.Columns[7].Width  = 200;
         dgvCadastro.Columns[8].Width  = 40;
         dgvCadastro.Columns[9].Width  = 200;
         dgvCadastro.Columns[10].Width = 150;
         dgvCadastro.Columns[11].Width = 40;
         dgvCadastro.Columns[12].Width = 80;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }