public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            /*
             * PropertyDescriptor member = TypeDescriptor.GetProperties(context.Instance)["ItemBindings"];
             * System.Web.UI.Design.ControlDesigner.InvokeTransactedChange((Component)context.Instance, new TransactedChangeCallback(this.InnerEditValues), null, null, member);
             */

            DataBindingControl        control  = (DataBindingControl)context.Instance;
            DataBindingItemCollection bindings = (DataBindingItemCollection)control.ItemBindings;
            DataBindingItem           binding  = new DataBindingItem();

            binding.ControlID = "Shen Zheng";
            bindings.Add(binding);

            context.OnComponentChanged();
            return(bindings);
        }
        public void CopyFromBindingItem(DataBindingItem item)
        {
            ExceptionHelper.FalseThrow <ArgumentNullException>(item != null, "item");

            this.ControlID              = item.ControlID;
            this.ControlPropertyName    = item.ControlPropertyName;
            this.ClientIsHtmlElement    = item.ClientIsHtmlElement;
            this.ClientDataPropertyName = item.ClientDataPropertyName;
            this.ClientPropName         = item.ClientPropName;
            this.ClientSetPropName      = item.ClientSetPropName;
            this.ClientDataType         = item.ClientDataType;
            this.IsValidate             = item.IsValidate;
            this.IsValidateOnBlur       = item.IsValidateOnBlur;
            this.DataPropertyName       = item.DataPropertyName;
            this.Direction              = item.Direction;
            this.Format            = item.Format;
            this.EnumAutoBinding   = item.EnumAutoBinding;
            this.ItemTrimBlankType = item.ItemTrimBlankType;
            this.EnumUsage         = item.EnumUsage;
            this.ValidationGroup   = item.ValidationGroup;
            this.AutoFormatOnBlur  = item.AutoFormatOnBlur;
        }
 public ClientDataBindingItem(DataBindingItem item)
 {
     CopyFromBindingItem(item);
 }