Exemple #1
0
        private void AtualizaGrid()
        {
            ClienteNegocios clienteNegocios = new ClienteNegocios();

            ClienteCollection clienteCollection = clienteNegocios.ConsultaPorNome(txbPesquisa.Text);

            dataGridViewPrincipal.DataSource = null;

            dataGridViewPrincipal.DataSource = clienteCollection;

            dataGridViewPrincipal.Update();
            dataGridViewPrincipal.Refresh();
        }