日期:2014-05-18 浏览次数:21065 次
SourceGrid.Cells.Editors.ComboBox externalIdEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(int));
externalIdEditor.StandardValues = new int[] { 1, 2, 3, 4 };
externalIdEditor.StandardValuesExclusive = true;
externalIdEditor.Control.FormattingEnabled = true;
externalIdEditor.AllowNull = false;
DevAge.ComponentModel.Validator.ValueMapping mapping = new DevAge.ComponentModel.Validator.ValueMapping();
mapping.ValueList = new int[] { 1, 2, 3, 4 };
mapping.DisplayStringList = new string[] { "Reference 1", "Reference 2", "Reference 3", "Reference 4" };
mapping.BindValidator(externalIdEditor);