public void AtualizaFiltro() { GridFornecedor.AutoGenerateColumns = false; GridFornecedor.DataSource = new SortableBindingList <Domain.Entity.Fornecedor>(_context .Fornecedores .Where(f => f.EmpresaId == (long)EditEmpresa.SelectedValue) .ToList()); if (GridFornecedor.Rows.Count > 0) { GridFornecedor.Rows[0].Selected = true; } LbPesquisa.Text = GridFornecedor.Ordena(1); }
private void GridFornecedor_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { LbPesquisa.Text = GridFornecedor.Ordena(e.ColumnIndex); GridFornecedor.Pesquisa(EditPesquisa.Text, (CurrencyManager)BindingContext[GridFornecedor.DataSource]); }