Exemplo n.º 1
0
        private void LoadPrivledgeGrid()
        {
            dgvPrivledge.DataSource = applicationFacade.GetPrivledges(txtPrivledgeSearch.Text);

            for (int i = 0; i < dgvPrivledge.Columns.Count; i++)
            {
                dgvPrivledge.Columns[i].Visible = false;
            }

            dgvPrivledge.Columns["PrivledgeName"].Visible      = true;
            dgvPrivledge.Columns["PrivledgeName"].HeaderText   = "Privledge Name";
            dgvPrivledge.Columns["PrivledgeName"].FillWeight   = 40;
            dgvPrivledge.Columns["PrivledgeName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            dgvPrivledge.Columns["ControlName"].Visible      = true;
            dgvPrivledge.Columns["ControlName"].HeaderText   = "Control Name";
            dgvPrivledge.Columns["ControlName"].FillWeight   = 20;
            dgvPrivledge.Columns["ControlName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            dgvPrivledge.Columns["Status"].Visible      = true;
            dgvPrivledge.Columns["Status"].HeaderText   = "Status";
            dgvPrivledge.Columns["Status"].FillWeight   = 10;
            dgvPrivledge.Columns["Status"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }