# Returning Information for a Clicked Cell

Learn how to obtain row and column index information for clicked cells using the CellClick event parameter and access x- and y-coordinates.

## Content



You can get row and column index information for cells that are clicked by accessing the [CellClick](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.CellClick.html) event parameter _e_ in the [CellClickEventArgs](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellClickEventArgs.html) class. You can get _x_\- and _y_\-coordinates as well from this parameter. You can implement a **MouseDown** event and from the _x_\- and _y_\-coordinates you can obtain row and column index information of the clicked cell. With the [GetCellFromPixel](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.GetCellFromPixel.html) method in the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class, you can get target cell information in the [CellRange](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Model.CellRange.html) class format. You can obtain row and column information from respective members.

You can obtain cell information such as positions and sizes that have been specified by row and column indexes. When the [GetCellRectangle](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.GetCellRectangle.html) method in the **FpSpread** class is called, specify the target row and column indexes. The cell coordinate information is returned in the .NET framework **Rectangle** format.

For headers, you can get row and column index information of clicked header cells by accessing **CellClick** event parameter _e_ in the **CellClickEventArgs** class. You can detect whether the headers have been clicked. You can get _x_\- and _y_\-coordinates as well from this parameter. You can implement a **MouseDown** event and from the _x_\- and _y_\-coordinates you can obtain row and column index information of the clicked header cell.

With the [GetColumnHeaderCellFromPixel](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SpreadView.GetColumnHeaderCellFromPixel.html) method in the [SpreadView](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SpreadView.html) class, you can get target cell information in the **CellRange** class format for column cells. You can obtain row and column information in column headers from respective members. In the case of row header cells, call the [GetRowHeaderCellFromPixel](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SpreadView.GetRowHeaderCellFromPixel.html) method.

## See Also

[Locating the Pointer Using HitTest](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interactcell/spwin-cell-indicators/spwin-cntrl-hittest)

[Preventing a Cell from Receiving Focus](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interactcell/spwin-cell-indicators/spwin-cell-focusstop)

[Customizing the Focus Indicator for a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-interactcell/spwin-cell-indicators/spwin-cellfocusind)