public virtual void RemoveEditor(IInputEditor editor) { GridViewEditManager gridViewEditManager = (GridViewEditManager)null; if (this.GridViewElement != null) { gridViewEditManager = this.GridViewElement.EditorManager; } if (gridViewEditManager == null || editor != null && !gridViewEditManager.IsPermanentEditor(editor.GetType())) { RadItem editorElement = this.GetEditorElement(editor); if (editorElement != null && this.Children.Contains((RadElement)editorElement)) { this.Children.Remove((RadElement)editorElement); } this.editor = (IInputEditor)null; this.SetContent(); } int num = (int)this.SetValue(GridDataCellElement.IsInEditModeProperty, (object)false); }
public virtual void AddEditor(IInputEditor editor) { GridViewEditManager editorManager = this.GridViewElement.EditorManager; if (editor != null && this.editor != editor && !editorManager.IsPermanentEditor(editor.GetType())) { this.editor = editor; RadItem editorElement = this.GetEditorElement(this.editor); if (editorElement != null && !this.Children.Contains((RadElement)editorElement)) { int num = (int)editorElement.SetDefaultValueOverride(VisualElement.ForeColorProperty, (object)Color.FromKnownColor(KnownColor.ControlText)); this.Children.Add((RadElement)editorElement); BaseGridEditor baseGridEditor = editor as BaseGridEditor; if (baseGridEditor != null && baseGridEditor.ClearCellText) { this.Text = string.Empty; } } } int num1 = (int)this.SetValue(GridDataCellElement.IsInEditModeProperty, (object)true); }