Using a BindingList in a mapping

Aug 17, 2011 at 11:30 AM


 I currently use the following code to populate a combo box on the grid using a mapping to display a string value instead of the data

SourceGrid.Cells.Editors.ComboBox edCmbEvents = new SourceGrid.Cells.Editors.ComboBox(typeof(long));
edCmbEvents.StandardValues = valList;
edCmbEvents.StandardValuesExclusive = true;
edCmbEvents.Control.FormattingEnabled = true;
edCmbEvents.Control.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
edCmbEvents.Control.AutoCompleteSource = AutoCompleteSource.ListItems;
edCmbEvents.Control.Width = 100;
edCmbEvents.AllowNull = true;
DevAge.ComponentModel.Validator.ValueMapping mapping = new DevAge.ComponentModel.Validator.ValueMapping();
mapping.ValueList = valList;            
mapping.DisplayStringList = namesList;

Is there anyway to use a bindinglist with a valuemapping rather than two separate array lists.   One idea is to create a new value mapping class but was hoping that someone may have already invented the wheel or at least a method of using the bindinglist.