/// <summary>
        /// BuildEditor creates the editor part of the Control.
        /// </summary>
        /// <param name="editInfo">The EditorInfo object for this control.</param>
        private EditControl BuildEditor(EditorInfo editInfo)
        {
            EditControl propEditor = EditControlFactory.CreateEditControl(editInfo);

            propEditor.ViewStateMode = ViewStateMode.Enabled;
            propEditor.ControlStyle.CopyFrom(this.EditControlStyle);
            propEditor.LocalResourceFile = this.LocalResourceFile;
            propEditor.User = this.User;
            if (editInfo.ControlStyle != null)
            {
                propEditor.ControlStyle.CopyFrom(editInfo.ControlStyle);
            }

            propEditor.ItemAdded    += this.CollectionItemAdded;
            propEditor.ItemDeleted  += this.CollectionItemDeleted;
            propEditor.ValueChanged += this.ValueChanged;
            if (propEditor is DNNListEditControl)
            {
                var listEditor = (DNNListEditControl)propEditor;
                listEditor.ItemChanged += this.ListItemChanged;
            }

            this.Editor = propEditor;

            return(propEditor);
        }
Example #2
0
        /// <Summary>BuildEditor creates the editor part of the Control</Summary>
        /// <Param name="editInfo">The EditorInfo object for this control</Param>
        private EditControl BuildEditor(EditorInfo editInfo)
        {
            EditControl propEditor = EditControlFactory.CreateEditControl(editInfo);

            propEditor.ControlStyle.CopyFrom(EditControlStyle);
            propEditor.LocalResourceFile = LocalResourceFile;
            if (editInfo.ControlStyle != null)
            {
                propEditor.ControlStyle.CopyFrom(editInfo.ControlStyle);
            }
            propEditor.ValueChanged += new PropertyChangedEventHandler(this.ValueChanged);
            if (propEditor is DNNListEditControl)
            {
                DNNListEditControl listEditor = (DNNListEditControl)propEditor;
                listEditor.ItemChanged += new PropertyChangedEventHandler(this.ListItemChanged);
            }

            _Editor = propEditor;

            return(propEditor);
        }