Ejemplo n.º 1
0
        private void LoadDuLieu()
        {
            dgvHocSinh.DataSource = HocSinhDAO.LoadDataHocSinh();
            cboLop.DataSource     = LopDAO.LoadDataLop1();
            cboLop.ValueMember    = "IDLop";
            cboLop.DisplayMember  = "TenLop";
            AutoCompleteStringCollection ac = new AutoCompleteStringCollection();
            DataTable dt = (DataTable)dgvHocSinh.DataSource;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ac.Add(dt.Rows[i][1].ToString());
            }
            txtTimKiem.AutoCompleteCustomSource = ac;
            ReadOnly();
        }