ZForge.Controls.XPTable.Editors.DropDownCellEditor.PrepareForEditing C# (CSharp) Méthode

PrepareForEditing() public méthode

Prepares the CellEditor to edit the specified Cell
public PrepareForEditing ( Cell cell, Table table, CellPos cellPos, Rectangle cellRect, bool userSetEditorValues ) : bool
cell ZForge.Controls.XPTable.Models.Cell The Cell to be edited
table ZForge.Controls.XPTable.Models.Table The Table that contains the Cell
cellPos ZForge.Controls.XPTable.Models.CellPos A CellPos representing the position of the Cell
cellRect System.Drawing.Rectangle The Rectangle that represents the Cells location and size
userSetEditorValues bool Specifies whether the ICellEditors /// starting value has already been set by the user
Résultat bool
        public override bool PrepareForEditing(Cell cell, Table table, CellPos cellPos, Rectangle cellRect, bool userSetEditorValues)
        {
            if (!(table.ColumnModel.Columns[cellPos.Column] is DropDownColumn))
            {
                throw new InvalidOperationException("Cannot edit Cell as DropDownCellEditor can only be used with a DropDownColumn");
            }

            return base.PrepareForEditing (cell, table, cellPos, cellRect, userSetEditorValues);
        }