internal void Editor_AfterItemRemove(Field item) { if (this.ParentGrid == null) { return; } if (this.ParentGrid.Controls.Contains(item)) { this.ParentGrid.Controls.Remove(item); } if (this.ParentGrid.LazyItems.Contains(item)) { this.ParentGrid.LazyItems.Remove(item); } }
/// <summary> /// Sets the form field to be used for editing. Note: This method only has an implementation if an Editing plugin has been enabled on the grid. /// </summary> /// <param name="editor">An object representing a field to be created. If no xtype is specified a 'textfield' is assumed.</param> public virtual void SetEditor(Field editor) { this.Call("setEditor", new JRawValue(editor.ToConfig(LazyMode.Config))); }
protected virtual void RemoveEditor(Field editor) { if (this.Controls.Contains(editor)) { this.Controls.Remove(editor); } if (this.LazyItems.Contains(editor)) { this.LazyItems.Remove(editor); } }
protected virtual void AddEditor(Field editor) { editor.EnableViewState = false; if (!this.Controls.Contains(editor)) { this.Controls.Add(editor); } if (!this.LazyItems.Contains(editor)) { this.LazyItems.Add(editor); } }
protected Field OnCreateFilterableField(object sender, ColumnBase column, Field defaultField) { if (column.DataIndex == "cNoOrden" && sOrdenesEstimaciones.GetAt(1) != null) { sOrdenesEstimaciones.DataSource = OrdenEstimacionBusiness.ObtenerOrdenesCambios(); sOrdenesEstimaciones.DataBind(); } return defaultField; }
public virtual void SetEditor(int columnIndex, Field editor, GridEditorOptions options) { if (options == null || options.IsDefault) { this.SetEditor(columnIndex, editor); return; } string editorCfg = "new Ext.grid.GridEditor(Ext.apply({{field:{0}}}, {1}))".FormatWith(editor.ToConfig(), options.Serialize()); this.CallColumnModel("setEditor", columnIndex, new JRawValue(editorCfg)); }
public virtual void SetEditor(int columnIndex, Field editor) { this.CallColumnModel("setEditor", columnIndex, new JRawValue(editor.ToConfig(LazyMode.Instance))); }