Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 /// <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)));
 }
Exemplo n.º 3
0
        protected virtual void RemoveEditor(Field editor)
        {
            if (this.Controls.Contains(editor))
            {
                this.Controls.Remove(editor);
            }

            if (this.LazyItems.Contains(editor))
            {
                this.LazyItems.Remove(editor);
            }
        }
Exemplo n.º 4
0
        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);
            }
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
        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));
        }
Exemplo n.º 7
0
 public virtual void SetEditor(int columnIndex, Field editor)
 {
     this.CallColumnModel("setEditor", columnIndex, new JRawValue(editor.ToConfig(LazyMode.Instance)));
 }