We help IT Professionals succeed at work.

Untick checkbox in datagridview cell

MichMat
MichMat asked
on
Medium Priority
284 Views
Last Modified: 2012-05-06
Hi ,

Im stuck on reseting a checkbox in a datagridview in win app

I tried
Me.DataGridView4.Item("B", DGV4).Value = 0
Me.DataGridView4.Item("B", DGV4).Value = False

it dosent work

Please help
Comment
Watch Question

Commented:
Me.DataGridView1.Rows(dgv4).Cells("B").value = false
Commented:
Me.DataGridView4.Rows(dgv4).Cells("B").value = false

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
Try checking also if the column is not readonly...

Author

Commented:
Its a curious thing .......

I used this code
Me.DataGridView4.Rows(DGV4).Cells("B").Selected = False

It works for the program in as much as the process says that the value of the box is false HOWEVER the box remains checked in the grid , so looking at it from users pointof view nothing happened but the value was changed. Infact if I click on it again the code behaves as if I selected the box as true yet NOW the checkbox is unticked ........

Commented:
Did you try this?
Me.DataGridView4.Rows(dgv4).Cells("B").value = false

Author

Commented:
yes I did did not work

Commented:
Does allow edit of the grid is set to true?

Author

Commented:
my problem was somwhere else the solution worked
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.