private void OrgForm_Load(object sender, EventArgs e) { Location = Owner.Location; Size = Owner.Size; OrgGridView.AllowUserToAddRows = false; OrgGridView.AllowUserToDeleteRows = false; OrgGridView.ReadOnly = true; OrganizationsData = new DataTableModel <Organization>(null); OrgGridView.DataSource = OrganizationsData.GetDataTable(); foreach (DataGridViewColumn col in OrgGridView.Columns) { col.HeaderText = OrganizationsData.GetDataTable().Columns[col.HeaderText].Caption; } OrgGridView.Columns[0].Visible = false; }
private void orgFilter_TextChanged(object sender, EventArgs e) { OrganizationsData.GetDataTable().DefaultView.RowFilter = $"Name LIKE '%{orgFilter.Text}%'"; }