Esempio n. 1
0
        public override void OnMouseClick(object o, MouseEventArgs e)
        {
            switch (e.Button)
            {
            case MouseButtons.Left:
            {
                ItemGridCell cell = o as ItemGridCell;
                _newcell.ParentGrid = ParentGrid;
                _newcell.Row        = Row;
                _newcell.Colomn     = Colomn;
                ItemGridDataCell newCell = (ItemGridDataCell)_newcell.Copy();
                if (cell == this || cell == null)
                {
                    ParentGrid.AddCellAt(this.Row, newCell);
                }
                else
                {
                    ParentGrid.InsertCellAt(cell.Colomn, cell.Row, newCell);
                }

                newCell.StartEditing(o, e);
            }
            break;

            case MouseButtons.Right:
                break;
            }
        }