private void GetCampaigns() { WaitDialog.Show("Loading campaign list ..."); this.ClearPages(); using (BrightPlatformEntities _efDbContext = new BrightPlatformEntities(UserSession.EntityConnection)) { List<CTCustomerCampaign> listCCS = _efDbContext.FIGetCustomerCampaign(UserSession.CurrentUser.UserId).ToList(); if (listCCS != null && listCCS.Count > 0) { lookUpEditCustomerCampaign.Properties.Columns.Clear(); lookUpEditCustomerCampaign.Properties.DataSource = listCCS; lookUpEditCustomerCampaign.Properties.DisplayMember = "title"; lookUpEditCustomerCampaign.Properties.ValueMember = "campaign_id"; lookUpEditCustomerCampaign.Properties.Columns.Add(new LookUpColumnInfo("title")); lookUpEditCustomerCampaign.Properties.ShowHeader = false; if (listCCS.Count >= 20) lookUpEditCustomerCampaign.Properties.DropDownRows = 30; lookUpEditCustomerCampaign.Properties.PopupWidth = 600; ccbeSubcampaign.Properties.DataSource = null; ccbeSubcampaign.Properties.PopupControl = null; ccbeSubcampaign.SetEditValue(null); ccbeSubcampaign.RefreshEditValue(); } } WaitDialog.Close(); }