예제 #1
0
 public static void LoadLookUpEdit(LookUpEdit lookUpEdit)
 {
     lookUpEdit.Properties.Columns.Clear();
     lookUpEdit.Properties.DataSource = TuyChonTimKiem.DanhSachTuyChonMacDinh();
     lookUpEdit.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Ten_tuy_chon", "Tùy chọn"));
     lookUpEdit.Properties.ShowHeader    = false;
     lookUpEdit.Properties.PopupWidth    = lookUpEdit.Width;
     lookUpEdit.Properties.DisplayMember = "Ten_tuy_chon";
     lookUpEdit.Properties.ValueMember   = "ID_tuy_chon";
     lookUpEdit.Properties.NullText      = "";
     lookUpEdit.ToolTip = lookUpEdit.Properties.NullValuePrompt = "Tùy chọn tìm kiếm";
     lookUpEdit.Properties.NullValuePromptShowForEmptyValue = true;
     lookUpEdit.Properties.AllowDropDownWhenReadOnly        = DevExpress.Utils.DefaultBoolean.True;
     lookUpEdit.EditValue = 3;
 }
예제 #2
0
 public static void LoadBindingSource(BindingSource bs)
 {
     bs.DataSource = TuyChonTimKiem.DanhSachTuyChonMacDinh();
 }