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); }
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); }