/// ----------------------------------------------------------------------------- /// <summary> /// CreateEditor creates the control collection for this control /// </summary> /// ----------------------------------------------------------------------------- protected virtual void CreateEditor() { EditorInfo editInfo = EditorInfoAdapter.CreateEditControl(); ID = editInfo.Name; if (editInfo != null) { editInfo.User = User; if (editInfo.EditMode == PropertyEditorMode.Edit) { editInfo.EditMode = EditMode; } //Get the Editor Type to use (if specified) if (!string.IsNullOrEmpty(EditorTypeName)) { editInfo.Editor = EditorTypeName; } //Get the Label Mode to use (if specified) if (LabelMode != LabelMode.Left) { editInfo.LabelMode = LabelMode; } //if Required is specified set editors property if (Required) { editInfo.Required = Required; } //Get the ValidationExpression to use (if specified) if (!string.IsNullOrEmpty(ValidationExpression)) { editInfo.ValidationExpression = ValidationExpression; } //Raise the ItemCreated Event OnItemCreated(new PropertyEditorItemEventArgs(editInfo)); Visible = editInfo.Visible; if (EditorDisplayMode == EditorDisplayMode.Div) { BuildDiv(editInfo); } else { BuildTable(editInfo); } } }
/// <Summary> /// CreateEditor creates the control collection for this control /// </Summary> protected virtual void CreateEditor() { EditorInfo editInfo = EditorInfoAdapter.CreateEditControl(); if (editInfo.EditMode == PropertyEditorMode.Edit) { editInfo.EditMode = EditMode; } if (EditorDisplayMode == EditorDisplayMode.Div) { BuildDiv(editInfo); } else { BuildTable(editInfo); } }