private void bteLinhVuc_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { frmLookUp_LinhVuc frmLookUp = new frmLookUp_LinhVuc(String.Format("%{0}%", bteLinhVuc.Text)); if (frmLookUp.ShowDialog(this) == DialogResult.OK) { bteLinhVuc.Text = frmLookUp.SelectedItem.Ten; bteLinhVuc.Tag = frmLookUp.SelectedItem; } }
private void bteLinhVuc_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { frmLookUp_LinhVuc frmLookUp = new frmLookUp_LinhVuc(String.Format("%{0}%", bteLinhVuc.Text)); if (frmLookUp.ShowDialog(this) == DialogResult.OK) { bteLinhVuc.Text = frmLookUp.SelectedItem.Ten; bteLinhVuc.Tag = frmLookUp.SelectedItem; } } }