static void PopulateComboBoxItems(ListEditItemCollection items, Type enumType) { items.Clear(); foreach (var value in Enum.GetValues(enumType)) { items.Add(DevExpress.Web.Internal.CommonUtils.SplitPascalCaseString(value.ToString()), value); } }
internal static void FillDias(ListEditItemCollection items) { items.Clear(); items.Add("Lunes", "LUNES"); items.Add("Martes", "MARTES"); items.Add("Miercoles", "MIERCOLES"); items.Add("Jueves", "JUEVES"); items.Add("Viernes", "VIERNES"); items.Add("Sabado", "SABADO"); items.Add("Domingo", "DOMINGO"); }
public static ListEditItemCollection GetCollection <T>(string caption) where T : struct { var collection = new ListEditItemCollection(); var values = GetKeysAndValues <T>(); if (!string.IsNullOrEmpty(caption)) { collection.Add(caption, 0); } collection.AddRange(values.Select(pair => new ListEditItem(pair.Value.ToString(), pair.Key)).ToList()); return(collection); }