dimanche 22 décembre 2019

how to invert string value from database to make the checkbox check/uncheck - VB.NET

I am creating a CRUD system on VB.Net, and I have converted my checkbox values to string upon adding to the database. Now, I wanted to invert the values. I want to make the checkbox state set to checked/unchecked based on the string value from the database whenever I select a row from datagrid.

This is the code I am trying to work on: CheckOne2One.Checked = Convert.ToBoolean(DataGridView1.CurrentRow.Cells("Class").Value)

thank you!




Aucun commentaire:

Enregistrer un commentaire