/// <summary> /// Cria uma nova coluna do tipo RepositoryItemLookUpEdit /// </summary> /// <param name="pCollumn">Coluna que será aplicado o combo</param> public TreeGridValidValuesColumn(TreeListColumn pCollumn) { pCollumn.ColumnEdit = this; ValidValues = new ValidValues(); ValidValues.OnAdd += new CollectionEventHandler(ValidValues_OnAdd); this.DataSource = new ValidValuesCollection(); this.ValueMember = "Value"; this.DisplayMember = "Description"; this.ShowHeader = false; }
/// <summary> /// Cria uma nova coluna do tipo RepositoryItemLookUpEdit /// </summary> public GridValidValuesColumn() { var myComboEdit = new RepositoryItemLookUpEdit(); this.ColumnEdit = myComboEdit; myComboEdit.ShowHeader = false; myComboEdit.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; ValidValues = new ValidValues(); ValidValues.OnAdd += new CollectionEventHandler(ValidValues_OnAdd); ValidValues.OnClear += new CollectionEventHandler(ValidValues_OnClear); ValidValues.OnRemove += new CollectionEventHandler(ValidValues_OnRemove); myComboEdit.DataSource = new ValidValuesCollection(); myComboEdit.ValueMember = "Value"; myComboEdit.DisplayMember = "Description"; }