XPTable.Models.Table.RaiseCellGotFocus C# (CSharp) Method

RaiseCellGotFocus() protected method

Raises the GotFocus event for the Cell at the specified position
protected RaiseCellGotFocus ( CellPos cellPos ) : void
cellPos CellPos The position of the Cell that gained focus
return void
        protected void RaiseCellGotFocus(CellPos cellPos)
        {
            if (!this.IsValidCell(cellPos))
            {
                return;
            }

            ICellRenderer renderer = this.ColumnModel.GetCellRenderer(cellPos.Column);

            if (renderer != null)
            {
                Cell cell = null;

                if (cellPos.Column < this.TableModel.Rows[cellPos.Row].Cells.Count)
                {
                    cell = this.TableModel.Rows[cellPos.Row].Cells[cellPos.Column];
                }

                CellFocusEventArgs cfea = new CellFocusEventArgs(cell, this, cellPos.Row, cellPos.Column, this.CellRect(cellPos.Row, cellPos.Column));

                this.OnCellGotFocus(cfea);
            }
        }
Table