一、设定属性:
// // lookUpEdit2 // this.lookUpEdit2.Location = new System.Drawing.Point(368, 112); this.lookUpEdit2.Name = "lookUpEdit2"; this.lookUpEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.lookUpEdit2.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] { new DevExpress.XtraEditors.Controls.LookUpColumnInfo("TICKETDESCRIPTION", "TICKETDESCRIPTION"), new DevExpress.XtraEditors.Controls.LookUpColumnInfo("TICKETTYPE", "", 20, DevExpress.Utils.FormatType.None, "", false, DevExpress.Utils.HorzAlignment.Default)}); this.lookUpEdit2.Size = new System.Drawing.Size(164, 20); this.lookUpEdit2.TabIndex = 40;
二、绑定数据:
/// <summary> /// 绑定门票 /// </summary> public void BindTickets() { lueCompanyEdit.Properties.DataSource = null; lueCompanyEdit.EditValue = null; BLLTicketWareHouseManagement bllTWMT = new BLLTicketWareHouseManagement(); DataTable dtTicketAll = bllTWMT.GetAllTicket(); DevHelper.FillLookUpEdit(lookUpEdit2, dtTicketAll, "TICKETDESCRIPTION", "TICKETTYPE", ""); //DevHelper.FillLookUpEdit(lueCompanyEdit, dtTicketAll, "TICKETDESCRIPTION", "TICKETTYPE", ""); }