Beispiel #1
0
        protected override object CreateControlCore()
        {
            var values = (this.CurrentObject as IVariantListProvider)?.GetNames(this.propertyName, "");

            if (values == null)
            {
                values = new List <string>();
            }

            var rst = new PredefinedValuesStringEdit(base.Model.MaxLength, values);

            rst.EditValueChanging += (s, e) =>
            {
                var v = (this.CurrentObject as IVariantListProvider)?.GetNames(this.propertyName, e.NewValue + "");
                if (v == null)
                {
                    v = new List <string>();
                }

                rst.CreatePredefinedListItems(v);
                if (v.Any())
                {
                    rst.ShowPopup();
                }
            };
            rst.Properties.AutoComplete = false;
            //rst.Properties.ImmediatePopup = true;
            return(rst);
        }
        protected override object CreateControlCore()
        {
            var values = (this.CurrentObject as IVariantListProvider)?.GetNames(this.propertyName, "");

            if (values == null)
            {
                values = new List<string>();
            }

            var rst = new PredefinedValuesStringEdit(base.Model.MaxLength, values);
            rst.EditValueChanging += (s, e) =>
            {
                var v = (this.CurrentObject as IVariantListProvider)?.GetNames(this.propertyName, e.NewValue + "");
                if (v == null)
                    v = new List<string>();

                rst.CreatePredefinedListItems(v);
                if (v.Any())
                    rst.ShowPopup();
            };
            rst.Properties.AutoComplete = false;
            //rst.Properties.ImmediatePopup = true;
            return rst;
        }