---
title: "Datagridview cellcontent click event not working properly"  
description: "Datagridview cellcontent click event not working properly"  
author: "Anonymous User"  
published: 2013-12-12  
updated: 2013-12-12  
canonical: https://www.mindstick.com/forum/1768/datagridview-cellcontent-click-event-not-working-properly  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Datagridview cellcontent click event not working properly

I wrote an [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) to [retrieve](https://www.mindstick.com/forum/34400/how-to-retrieve-form-values-in-controller-action) the first [cell value](https://www.mindstick.com/forum/33654/send-table-view-cell-value-on-button-action-in-ios) of the clicked cell's [row](https://www.mindstick.com/forum/1212/this-row-already-belongs-to-this-table) on CellContentClick event in datagridview. but the event is getting raised only when i [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) the [third](https://yourviews.mindstick.com/story/4957/the-significance-of-the-third-eye-in-hinduism-more-than-just-a-symbol) cell and not getting raised when i click the first or [second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) cell of datagridview.

Please help me.

## Replies

### Reply by Pravesh Singh

Hi John,\
\

Try to implement the CellClick event instead of CellContentClick event

```
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e){   DataGridView theGrid = sender as DataGridView;   if(theGrid != null)   {      DataGridViewCell selectedCell = theGrid.SelectedCells[0];      //Do your logic here   }}
```


---

Original Source: https://www.mindstick.com/forum/1768/datagridview-cellcontent-click-event-not-working-properly

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
