void InitNullText(WebPropertyEditor propertyEditor) { if (propertyEditor.ViewEditMode == ViewEditMode.Edit) { ((ASPxDateEdit)propertyEditor.Editor).NullText = CaptionHelper.NullValueText; } }
private void InitNullText(WebPropertyEditor propertyEditor) { if (propertyEditor.ViewEditMode == DevExpress.ExpressApp.Editors.ViewEditMode.Edit) { ((ASPxDateEdit)propertyEditor.Editor).NullText = CaptionHelper.NullValueText; } }
TableCell ContainerCell(WebPropertyEditor item) { var tableEx = ((TableEx)item.Control); if (tableEx == null) { return(null); } return(((TableRow)tableEx.Controls[0]).Cells[1]); }
protected override void CustomizeDisabledEditorsAppearance(ApplyAppearanceEventArgs e) { base.CustomizeDisabledEditorsAppearance(e); WebPropertyEditor dxEditor = e.Item as WebPropertyEditor; if (dxEditor != null && dxEditor.Editor != null) { dxEditor.Editor.BorderStyle = BorderStyle.Dashed; dxEditor.Editor.BackColor = Color.RosyBrown; } }
IModelLayoutViewItemStyle ModelLayoutViewItem(WebPropertyEditor webPropertyEditor) { Guard.ArgumentNotNull(webPropertyEditor, "webPropertyEditor"); if (View == null) { return((IModelLayoutViewItemStyle)webPropertyEditor.Model); } var modelDetailView = View.Model as IModelDetailView; return(modelDetailView == null ? (IModelLayoutViewItemStyle)webPropertyEditor.Model : modelDetailView.Layout.ViewItems(webPropertyEditor.Model).Cast <IModelLayoutViewItemStyle>().FirstOrDefault()); }
private void ConfigureAceEditor(WebPropertyEditor propertyEditor) { var aceEditorNeighborControl = GetAceEditorNeighborControl(propertyEditor); if (aceEditorNeighborControl != null) { var aceEditor = new AceEditor(); var literalControl = GetParentControlCollection(aceEditorNeighborControl, propertyEditor.ViewEditMode).OfType <Literal>().First(); literalControl.Text = aceEditor.CreateContainer(aceEditorNeighborControl.ClientID, (string)propertyEditor.PropertyValue); var syntaxHighLight = ((IModelPropertyEditorSyntaxHighlight)propertyEditor.Model).SyntaxHighlight; var allowEdit = View.ViewEditMode == ViewEditMode.Edit && propertyEditor.AllowEdit; aceEditor.Configure(aceEditorNeighborControl.ClientID, syntaxHighLight, allowEdit, (string)propertyEditor.PropertyValue); } }
void ApplyStyle(WebPropertyEditor webPropertyEditor) { var modelLayoutViewItem = ModelLayoutViewItem(webPropertyEditor); if (modelLayoutViewItem != null) { var containerCell = ContainerCell(webPropertyEditor); if (containerCell != null) { _layoutStyleProvider.ApplyContainerCellStyle(containerCell, modelLayoutViewItem.LayoutStyle); _layoutStyleProvider.ApplyControlStyle((WebControl)containerCell.Controls[0], modelLayoutViewItem.LayoutStyle); } } }
private void WebNullTextEditorController_Activated(object sender, EventArgs e) { WebPropertyEditor propertyEditor = ((DetailView)View).FindItem("Anniversary") as WebPropertyEditor; if (propertyEditor != null) { if (propertyEditor.Control != null) { InitNullText(propertyEditor); } else { propertyEditor.ControlCreated += new EventHandler <EventArgs>(propertyEditor_ControlCreated); } } }
protected override void OnActivated() { base.OnActivated(); WebPropertyEditor propertyEditor = ((DetailView)View).FindItem("Anniversary") as WebPropertyEditor; if (propertyEditor != null) { if (propertyEditor.Control != null) { InitNullText(propertyEditor); } else { propertyEditor.ControlCreated += new EventHandler <EventArgs>(propertyEditor_ControlCreated); } } }
protected override void OnActivated() { base.OnActivated(); // Perform various tasks depending on the target View. WebPropertyEditor propertyEditor = ((DetailView)View).FindItem("Anniversary") as WebPropertyEditor; if (propertyEditor != null) { if (propertyEditor.Control != null) { InitNullText(propertyEditor); } else { propertyEditor.ControlCreated += PropertyEditor_ControlCreated; } } }
protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); ASPxTreeListEditor editor = View.Editor as ASPxTreeListEditor; if (editor != null && View.Model.AllowEdit) { editor.TreeList.SettingsEditing.Mode = DevExpress.Web.ASPxTreeList.TreeListEditMode.Inline; editor.TreeList.NodeUpdating += new DevExpress.Web.Data.ASPxDataUpdatingEventHandler(TreeList_NodeUpdating); editor.TreeList.CommandColumnButtonInitialize += new TreeListCommandColumnButtonEventHandler(TreeList_CommandColumnButtonInitialize); foreach (TreeListColumn column in editor.TreeList.Columns) { if (column is TreeListDataColumn && ((TreeListDataColumn)column).EditCellTemplate != null) { WebPropertyEditor propertyEditor = ((EditModeDataItemTemplate)((TreeListDataColumn)column).EditCellTemplate).PropertyEditor; propertyEditor.ControlCreated += new EventHandler <EventArgs>(propertyEditor_ControlCreated); } } } }
public static IEnumerable <ASPxWebControl> GetEditors(this WebPropertyEditor propertyEditor) { var lookupPropertyEditor = propertyEditor as ASPxLookupPropertyEditor; if (lookupPropertyEditor != null) { yield return(lookupPropertyEditor.DropDownEdit.DropDown); yield return(lookupPropertyEditor.FindEdit.Editor); yield break; } var searchLookupPropertyEditor = propertyEditor as ASPxSearchLookupPropertyEditor; if (searchLookupPropertyEditor != null) { yield return(searchLookupPropertyEditor.SearchDropDownEdit.DropDown); yield break; } yield return(propertyEditor.Editor as ASPxWebControl); }
public ASPxPropertyEditorUploadControlProvider(ASPxUploadControl asPxUploadControl, WebPropertyEditor webPropertyEditor) { _asPxUploadControl = asPxUploadControl; _webPropertyEditor = webPropertyEditor; }
private bool SyntaxHighlightEnabled(WebPropertyEditor propertyEditor) { return(!string.IsNullOrWhiteSpace(((IModelPropertyEditorSyntaxHighlight)propertyEditor.Model).SyntaxHighlight.Mode)); }
private WebControl GetAceEditorNeighborControl(WebPropertyEditor webPropertyEditor) { return((WebControl)(View.ViewEditMode == ViewEditMode.Edit? webPropertyEditor.Editor:webPropertyEditor.Control)); }
TableCell ContainerCell(WebPropertyEditor item) { var tableEx = (item.Control as TableEx); return(((TableRow)tableEx?.Controls[0])?.Cells[1]); }
private void InitNullText(WebPropertyEditor propertyEditor) { if(propertyEditor.ViewEditMode == DevExpress.ExpressApp.Editors.ViewEditMode.Edit) { ((ASPxDateEdit)propertyEditor.Editor).NullText = CaptionHelper.NullValueText; } }