---
title: "When i click on any datagridview cell entire row will select."  
description: "When i click on any datagridview cell entire row will select."  
author: "Anonymous User"  
published: 2013-06-15  
updated: 2013-06-15  
canonical: https://www.mindstick.com/forum/1139/when-i-click-on-any-datagridview-cell-entire-row-will-select  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# When i click on any datagridview cell entire row will select.

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances),\
When i [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) on any [datagridview](https://www.mindstick.com/articles/607/working-with-datagridview-in-vc-sharp) cell [entire row](https://answers.mindstick.com/qa/46828/if-i-buy-an-entire-row-of-seats-on-a-long-flight-so-no-one-is-next-to-me-can-the-airline-sell-one-of-my-empty-seats-to-someone-or-will-they-respect-the-fact-that-the-empty-seats-are-mine-to-do-as-i-p) will select.\

## Replies

### Reply by AVADHESH PATEL

Hi Garry,\
In datagridview_CellClick event write this code **dataGridView1.Rows[e.RowIndex].Selected = true;** **\****exmaple: -**\

```
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)        {            dataGridView1.Rows[e.RowIndex].Selected = true;         }
```


---

Original Source: https://www.mindstick.com/forum/1139/when-i-click-on-any-datagridview-cell-entire-row-will-select

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
