コード例 #1
0
 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());
 }
コード例 #2
0
 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 });
 }