system.formatException runtime error in datagridview

TKap

Member
Joined
Nov 5, 2012
Messages
9
Programming Experience
Beginner
system.formatException :value can't be converted to boolean

code snippet is as follows


da1 = New OleDb.OleDbDataAdapter("select ghID,ref_location,gh_type from ghouseMaster where ghouseMaster.city='" & CmbCity.SelectedValue.ToString & "' ", con)
da1.Fill(ds1, "ghouseMaster")
DataGridView1.DataSource = ds1.Tables("ghouseMaster")
DataGridView1.Columns("ghID").Visible = False
Dim chb As New DataGridViewCheckBoxColumn()
DataGridView1.Columns.Insert(0, chb)
chb.HeaderText = ""


Have written this code in a comboBox's selectedItemChanged event and its a runtime exception.
Also, I have 2 dataGridViews on the form so when I uncheck any checkbox in the 2nd DGV, the checkboxe in the 1st DGV also gets unchecked automatically and few more things happening in the DGVs which shouldn't be happening and its a complete chaos basically. PLZ help!:distress:
 
Back
Top