LookUpEdit的使用

//治疗方式
             cboTreatmentMethod.Properties.DataSource = null;
             cboTreatmentMethod.Properties.DataSource = objTreatmentMethodManager.GetAllTreatmentMethods();
             cboTreatmentMethod.Properties.DisplayMember = "MethodName";
             cboTreatmentMethod.Properties.ValueMember = "MethodID";
             cboTreatmentMethod.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("MethodName", "治疗方式"));
             cboTreatmentMethod.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("MethodNameDetail", "标记"));
             cboTreatmentMethod.Properties.NullText = "请选择治疗方式";
        //主诊医生
        cboPatientTheAttendingPhysician.Properties.NullText = "请选择医生";
        cboPatientTheAttendingPhysician.Properties.DataSource = null;
        cboPatientTheAttendingPhysician.Properties.DataSource = objDocotrManager.GetAllDoctor();
        cboPatientTheAttendingPhysician.Properties.DisplayMember = "DoctorName";
        cboPatientTheAttendingPhysician.Properties.ValueMember = "DoctorID";
        cboPatientTheAttendingPhysician.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("DoctorName","医生列表"));
        //主管医生
        cboPatientChargeOfPhysicians.Properties.NullText = "请选择医生";
        cboPatientChargeOfPhysicians.Properties.DataSource = null;
        cboPatientChargeOfPhysicians.Properties.DataSource = objDocotrManager.GetAllDoctor();
        cboPatientChargeOfPhysicians.Properties.DisplayMember = "DoctorName";
        cboPatientChargeOfPhysicians.Properties.ValueMember = "DoctorID";
        //仅显示医生列,不显示其他列
        cboPatientChargeOfPhysicians.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("DoctorName", "医生列表"));
赞(0)
未经允许不得转载:TaKaSa » LookUpEdit的使用