예제 #1
0
        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;
        }
예제 #2
0
 private void orgFilter_TextChanged(object sender, EventArgs e)
 {
     OrganizationsData.GetDataTable().DefaultView.RowFilter = $"Name LIKE '%{orgFilter.Text}%'";
 }