[help] Insert database is ok but doesn't load datagridview
-
hi every body. Thks for helping about errors in VB.NET. The problem is shown: I have textbox vs button OK vs datagridview(dtgvInTem). When I input(fill) values for the textboxs and click button OK. + The database is added a record 1 - but not load on datagridview + Continue, I input - click button OK - datagridview load record 1 - but not load on record 2 on datagird I need when I click button Ok --> inserted database oki and load, show on datagridview a record inputed. Thanks you everybody. P/s the code in VB.NET
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
kn = New KetnoiDB()
' insert Table in_Tem is oki - I tested ok
kn.insert_inTem(sku, tenHang, upc, sl, gia, maNCC, ngayin)
'dtgvInTem.Refresh()
'dtgvInTem.Rows.Clear()' -- By query: load Table in\_Tem datagrid but not load a record inputed dtgvInTem.DataSource = kn.load\_Table("Q\_load\_inTem") kn.Close() Form1\_Load(sender, e) dtgvInTem.Refresh()