示例#1
0
 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);
     }
 }
示例#2
0
 protected override void SetupControl(WebControl control)
 {
     base.SetupControl(control);
     if (ViewEditMode == ViewEditMode.Edit)
     {
         ListEditItemCollection items = ((ASPxComboBox)control).Items;
         items.Clear();
         ComboBoxItemsBuilder.Create()
         .WithPropertyEditor(this)
         .Build((enumerable, b) => {
             items.Clear();
             items.AddRange(enumerable.Select(s => new ListEditItem(s)).ToList());
             Debug.WriteLine("");
         }, () => {
             var handledEventArgs = new HandledEventArgs();
             OnItemsCalculating(handledEventArgs);
             return(handledEventArgs.Handled);
         });
     }
 }
示例#3
0
 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");
 }
 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");
 }