public static void BindEnum <TEnum>( this ListControl list, IEnumerable <EnumSelectListItem <TEnum> > collection, TEnum[] selectedValues) where TEnum : struct { DropDownDataHelper.BindCollection( list, collection, e => e.Value.ToString(), e => e.Name, selectedValues.Select(v => v.ToString()).ToArray()); }
public static void BindCollection <T>( this ListControl list, IEnumerable <T> collection, Func <T, object> valueFormat, Func <T, object> textFormat, string selectedValue) { DropDownDataHelper.BindCollection(list, collection, valueFormat, textFormat, new[] { selectedValue }); }