private void AddEditorRow(FieldEditorControl editor, WebControl container)
        {
            editor.ControlStyle.CopyFrom(ItemStyle);
            editor.LabelStyle.CopyFrom(LabelStyle);
            editor.HelpStyle.CopyFrom(HelpStyle);
            editor.ErrorStyle.CopyFrom(ErrorStyle);
            editor.VisibilityStyle.CopyFrom(VisibilityStyle);
            editor.EditControlStyle.CopyFrom(EditControlStyle);
            if (editor.EditControlWidth == Unit.Empty)
            {
                editor.EditControlWidth = EditControlWidth;
            }
            editor.LocalResourceFile = LocalResourceFile;
            editor.RequiredUrl       = RequiredUrl;
            editor.ShowRequired      = ShowRequired;
            editor.ShowVisibility    = ShowVisibility;
            editor.User         = User;
            editor.Width        = Width;
            editor.ItemAdded   += CollectionItemAdded;
            editor.ItemChanged += ListItemChanged;
            editor.ItemCreated += EditorItemCreated;
            editor.ItemDeleted += CollectionItemDeleted;

            editor.DataBind();
            container.Controls.Add(editor);
        }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// AddEditorRow builds a sigle editor row and adds it to the Table, using the
        /// specified adapter
        /// </summary>
        /// <param name="table">The Table Control to add the row to</param>
        /// <param name="name">The name of property being added</param>
        /// <param name="adapter">An IEditorInfoAdapter</param>
        /// -----------------------------------------------------------------------------
        protected void AddEditorRow(Table table, string name, IEditorInfoAdapter adapter)
        {
            var row = new TableRow();

            table.Rows.Add(row);

            var cell = new TableCell();

            row.Cells.Add(cell);

            //Create a FieldEditor for this Row
            var editor = new FieldEditorControl
            {
                DataSource             = DataSource,
                EditorInfoAdapter      = adapter,
                DataField              = name,
                EditorDisplayMode      = DisplayMode,
                EnableClientValidation = EnableClientValidation,
                EditMode        = EditMode,
                HelpDisplayMode = HelpDisplayMode,
                LabelMode       = LabelMode,
                LabelWidth      = LabelWidth
            };

            AddEditorRow(editor, cell);

            Fields.Add(editor);
        }
        protected void AddEditorRow(WebControl container, string name, IEditorInfoAdapter adapter)
        {
            var editor = new FieldEditorControl
            {
                DataSource             = DataSource,
                EditorInfoAdapter      = adapter,
                DataField              = name,
                EditorDisplayMode      = DisplayMode,
                EnableClientValidation = EnableClientValidation,
                EditMode        = EditMode,
                HelpDisplayMode = HelpDisplayMode,
                LabelMode       = LabelMode,
                LabelWidth      = LabelWidth
            };

            AddEditorRow(editor, container);

            Fields.Add(editor);
        }
Exemplo n.º 4
0
        protected void AddEditorRow(ref Table tbl, string name, IEditorInfoAdapter adapter)
        {
            TableRow row = new TableRow();

            tbl.Rows.Add(row);

            TableCell cell = new TableCell();

            row.Cells.Add(cell);

            //Create a FieldEditor for this Row
            FieldEditorControl editor = new FieldEditorControl();

            editor.DataSource             = DataSource;
            editor.EditorInfoAdapter      = adapter;
            editor.DataField              = name;
            editor.EditorDisplayMode      = DisplayMode;
            editor.EditorDisplayMode      = EditorDisplayMode.Div;
            editor.EnableClientValidation = EnableClientValidation;
            editor.EditMode   = EditMode;
            editor.LabelWidth = LabelWidth;
            editor.LabelStyle.CopyFrom(LabelStyle);
            editor.HelpStyle.CopyFrom(HelpStyle);
            editor.ErrorStyle.CopyFrom(ErrorStyle);
            editor.VisibilityStyle.CopyFrom(VisibilityStyle);
            editor.EditControlStyle.CopyFrom(EditControlStyle);
            editor.EditControlWidth  = EditControlWidth;
            editor.LocalResourceFile = LocalResourceFile;
            editor.RequiredUrl       = RequiredUrl;
            editor.ShowRequired      = ShowRequired;
            editor.ShowVisibility    = ShowVisibility;
            editor.Width             = Width;
            editor.ItemChanged      += new PropertyChangedEventHandler(this.ListItemChanged);
            editor.DataBind();
            Fields.Add(editor);
            cell.Controls.Add(editor);
        }
Exemplo n.º 5
0
        protected void AddEditorRow(WebControl container, string name, IEditorInfoAdapter adapter)
        {
            var editor = new FieldEditorControl
            {
                DataSource = DataSource,
                EditorInfoAdapter = adapter,
                DataField = name,
                EditorDisplayMode = DisplayMode,
                EnableClientValidation = EnableClientValidation,
                EditMode = EditMode,
                HelpDisplayMode = HelpDisplayMode,
                LabelMode = LabelMode,
                LabelWidth = LabelWidth
            };
            AddEditorRow(editor, container);

            Fields.Add(editor);
        }
Exemplo n.º 6
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// AddEditorRow builds a sigle editor row and adds it to the Table, using the
        /// specified adapter
        /// </summary>
		/// <param name="table">The Table Control to add the row to</param>
        /// <param name="name">The name of property being added</param>
        /// <param name="adapter">An IEditorInfoAdapter</param>
        /// <history>
        ///     [cnurse]	05/08/2006	created
        /// </history>
        /// -----------------------------------------------------------------------------
        protected void AddEditorRow(Table table, string name, IEditorInfoAdapter adapter)
        {
            var row = new TableRow();
            table.Rows.Add(row);

            var cell = new TableCell();
            row.Cells.Add(cell);

            //Create a FieldEditor for this Row
            var editor = new FieldEditorControl
                             {
                                 DataSource = DataSource,
                                 EditorInfoAdapter = adapter,
                                 DataField = name,
                                 EditorDisplayMode = DisplayMode,
                                 EnableClientValidation = EnableClientValidation,
                                 EditMode = EditMode,
                                 HelpDisplayMode = HelpDisplayMode,
                                 LabelMode = LabelMode,
                                 LabelWidth = LabelWidth
                             };
            AddEditorRow(editor, cell);

            Fields.Add(editor);
        }
Exemplo n.º 7
0
        private void AddEditorRow(FieldEditorControl editor, WebControl container)
        {
            editor.ControlStyle.CopyFrom(ItemStyle);
            editor.LabelStyle.CopyFrom(LabelStyle);
            editor.HelpStyle.CopyFrom(HelpStyle);
            editor.ErrorStyle.CopyFrom(ErrorStyle);
            editor.VisibilityStyle.CopyFrom(VisibilityStyle);
            editor.EditControlStyle.CopyFrom(EditControlStyle);
            if (editor.EditControlWidth == Unit.Empty)
            {
                editor.EditControlWidth = EditControlWidth;
            }
            editor.LocalResourceFile = LocalResourceFile;
            editor.RequiredUrl = RequiredUrl;
            editor.ShowRequired = ShowRequired;
            editor.ShowVisibility = ShowVisibility;
            editor.User = User;
            editor.Width = Width;
            editor.ItemAdded += CollectionItemAdded;
            editor.ItemChanged += ListItemChanged;
            editor.ItemCreated += EditorItemCreated;
            editor.ItemDeleted += CollectionItemDeleted;

            editor.DataBind();
            container.Controls.Add(editor);
        }
        protected void AddEditorRow( ref Table tbl, string name, IEditorInfoAdapter adapter )
        {
            TableRow row = new TableRow();
            tbl.Rows.Add(row);

            TableCell cell = new TableCell();
            row.Cells.Add(cell);

            //Create a FieldEditor for this Row
            FieldEditorControl editor = new FieldEditorControl();
            editor.DataSource = DataSource;
            editor.EditorInfoAdapter = adapter;
            editor.DataField = name;
            editor.EditorDisplayMode = DisplayMode;
            editor.EditorDisplayMode = EditorDisplayMode.Div;
            editor.EnableClientValidation = EnableClientValidation;
            editor.EditMode = EditMode;
            editor.LabelWidth = LabelWidth;
            editor.LabelStyle.CopyFrom(LabelStyle);
            editor.HelpStyle.CopyFrom(HelpStyle);
            editor.ErrorStyle.CopyFrom(ErrorStyle);
            editor.VisibilityStyle.CopyFrom(VisibilityStyle);
            editor.EditControlStyle.CopyFrom(EditControlStyle);
            editor.EditControlWidth = EditControlWidth;
            editor.LocalResourceFile = LocalResourceFile;
            editor.RequiredUrl = RequiredUrl;
            editor.ShowRequired = ShowRequired;
            editor.ShowVisibility = ShowVisibility;
            editor.Width = Width;
            editor.ItemChanged += new PropertyChangedEventHandler(this.ListItemChanged);
            editor.DataBind();
            Fields.Add(editor);
            cell.Controls.Add(editor);
        }