public void actualizagrid()
 {
     DAO.FacturasDAO facturas = new EquimarFac.DAO.FacturasDAO();
     if (comboBox1.Text == "Canceladas")
     {
         dataGridView1.DataSource = facturas.devuelvefacturascanceladas();
     }
     else
     {
         dataGridView1.DataSource = facturas.devuelvefacturas();
     }
     this.dataGridView1.Sort(dataGridView1.Columns[0], ListSortDirection.Descending);
 }
        private void textBox8_TextChanged(object sender, EventArgs e)
        {
            try
            {
                string          campo = comboBox1.Text;
                DataView        dv;
                DAO.FacturasDAO facturas = new EquimarFac.DAO.FacturasDAO();

                if (campo == "Canceladas")
                {
                    actualizagrid();
                }
                else
                {
                    dv           = new DataView(facturas.devuelvefacturas());
                    dv.RowFilter = campo + " like '%" + textBox8.Text + "%'";

                    dataGridView1.DataSource = dv;
                }
            }
            catch
            {
            }
        }