private void AttachDetailInfoRefEditor() { XRepositoryRefEdit edit = new XRepositoryRefEdit(this.GetGridControl()); edit.RefEditor = new CustomRefSetItmsControl(this, edit, this.allowEdit); this.GetGridControl().DataTable.Columns["customercolumn_details"].ColumnEdit = edit; }
/// <summary> /// /// </summary> /// <param name="o">父对象</param> /// <param name="emsObsLaps">表格数据源</param> /// <param name="isAllowEdit">是否允许编辑</param> /// <param name="isLisDiag">区别是检验还是检查</param> public CustomRefSetItmsControl(BaseEmsView o, XRepositoryRefEdit refEdit, bool isAllowEdit) { this.emsView = o; this.refEdit = refEdit; this.isAllowEdit = isAllowEdit; this.ValueTextChanged += MySearchBox_ValueTextChanged; this.KeyPress += new KeyPressEventHandler(CustomRefControl_KeyPress); }
public CustomRefControl(XapFormGridControl gc, XRepositoryRefEdit edit) : base() { gridControl = gc; refEdit = edit; AutoShowClearButton = false; ValueTextChanged += MySearchBox_ValueTextChanged; this.KeyPress += new KeyPressEventHandler(CustomRefControl_KeyPress); }
/// <summary> /// 设置表格中受邀方字段可编辑 /// </summary> private void initDepInvitorEditor() { XRepositoryRefEdit edit = new XRepositoryRefEdit(this.GetGridControl()); edit.RefEditor = new CustomRefControl(this.GetGridControl(), edit); foreach (var col in this.GetGridControl().DataTable.Columns) { string fieldName = col.FieldName.ToLower(); if ("customercolumn_dep_invitors".Equals(fieldName)) { col.ColumnEdit = edit; break; } } }