Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. [help] Insert database is ok but doesn't load datagridview

[help] Insert database is ok but doesn't load datagridview

Scheduled Pinned Locked Moved Visual Studio
databasehelpcsharpvisual-studio
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vu Anh Tran
    wrote on last edited by
    #1

    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()
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups