public void Show_DS_LoaiCongTrinh(BindingNavigator bdn, GridControl dgv)
        {
            DataTable     DTT  = DATA.Show_LoaiCongTrinh();
            BindingSource BD_S = new BindingSource();

            BD_S.DataSource   = DTT;
            bdn.BindingSource = BD_S;
            dgv.DataSource    = BD_S;
        }
Example #2
0
        private void QL_CongTrinhVienThong_Load(object sender, EventArgs e)
        {
            CTRL.DanhsachCongTrinhVienThong(gridControl1, bindingNavigator1);

            this.repositoryItemLookUpEdit1.DataSource    = ctrinh.Show_LoaiCongTrinh();
            this.repositoryItemLookUpEdit1.DisplayMember = "TenLoaiCongTrinh";
            this.repositoryItemLookUpEdit1.ValueMember   = "MaLoaiCongTrinh";

            this.repositoryItemLookUpEdit2.DataSource    = dn.Show_DoanhNghiep();
            this.repositoryItemLookUpEdit2.DisplayMember = "TenDoanhNghiep";
            this.repositoryItemLookUpEdit2.ValueMember   = "MaDoanhNghiep";
            //khoa luoi
            gridView1.OptionsBehavior.Editable = false;


            //to vang cot ma
            GridColumn unbColumn = gridView1.Columns["MaCongTrinh"];

            // Disable editing.
            unbColumn.OptionsColumn.AllowEdit  = false;
            unbColumn.AppearanceCell.BackColor = Color.LemonChiffon;
        }