public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { if (value is AltIdList) { PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(null); AltIdList altIdList = (AltIdList)value; foreach (AltId current in altIdList) { propertyDescriptorCollection.Add(new AltIdPropertyDescriptor(current)); } return(propertyDescriptorCollection); } return(base.GetProperties(context, value, attributes)); }
protected override object SetItems(object editValue, object[] value) { if (editValue is AltIdList) { AltIdList altIdList = (AltIdList)editValue; altIdList.Clear(); for (int i = 0; i < value.Length; i++) { AltId id = (AltId)value[i]; altIdList.Add(id); } return(editValue); } return(base.SetItems(editValue, value)); }