---
title: "check and uncheck function in datagridview in c#"  
description: "check and uncheck function in datagridview in c#"  
author: "marcel ethan"  
published: 2013-01-04  
updated: 2013-01-04  
canonical: https://www.mindstick.com/forum/524/check-and-uncheck-function-in-datagridview-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# check and uncheck function in datagridview in c#

Hi every one,\
\
I'm working on [datagridview](https://www.mindstick.com/articles/607/working-with-datagridview-in-vc-sharp) in [windows](https://www.mindstick.com/articles/311752/how-to-install-and-use-the-google-wifi-software-on-a-windows-or-mac-computer) form. I have used [checkbox](https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net) in our gridview. I have successfully added checkbox and it generated for every rows. But this [check](https://yourviews.mindstick.com/story/2248/never-forget-to-check-these-specifications-before-buying-a-mobile-phone) box not check and uncheck. Can you tell me [functionality](https://www.mindstick.com/blog/136/using-watermark-functionality-in-textbox-by-jquery) of check and unchecked of checkbox ?\
\
Thank in [advanced](https://www.mindstick.com/articles/12993/5-advanced-features-for-your-odoo-ecommerce-theme)

## Replies

### Reply by AVADHESH PATEL

Hi Marcel Ethan\
\
You can used below code\
\

```
private void dgvControl_CellClick(object sender, DataGridViewCellEventArgs e){      if ((Convert.ToBoolean(dgvControl[0, e.RowIndex].Value) == false))                        dgvControl.Rows[e.RowIndex].Cells["ckbSelect"].Value = true;            else                        dgvControl.Rows[e.RowIndex].Cells["ckbSelect"].Value = false;}
```

\
I hope above code solve your problem.


---

Original Source: https://www.mindstick.com/forum/524/check-and-uncheck-function-in-datagridview-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
