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 Basic
  4. DataGridView RecordSource on same instance of MDI Child

DataGridView RecordSource on same instance of MDI Child

Scheduled Pinned Locked Moved Visual Basic
questionsales
4 Posts 2 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.
  • G Offline
    G Offline
    GetFree123GetFree
    wrote on last edited by
    #1

    i have a search textbox and search button on the MainForm (MdiParent). when users clicks on search button it shows the search results from the customer table in ChildForm's dataGridView. but since i only show the same instance of the ChildForm, it only works for the first time. how do i show the new search results without creating new ChildForm instance? Thanks

    I 1 Reply Last reply
    0
    • G GetFree123GetFree

      i have a search textbox and search button on the MainForm (MdiParent). when users clicks on search button it shows the search results from the customer table in ChildForm's dataGridView. but since i only show the same instance of the ChildForm, it only works for the first time. how do i show the new search results without creating new ChildForm instance? Thanks

      I Offline
      I Offline
      infothegdc
      wrote on last edited by
      #2

      are you using a dataset result and databinding the grid each time you search? Or have you bound the grid at design time? Johny

      G 1 Reply Last reply
      0
      • I infothegdc

        are you using a dataset result and databinding the grid each time you search? Or have you bound the grid at design time? Johny

        G Offline
        G Offline
        GetFree123GetFree
        wrote on last edited by
        #3

        The results are datasets.

        I 1 Reply Last reply
        0
        • G GetFree123GetFree

          The results are datasets.

          I Offline
          I Offline
          infothegdc
          wrote on last edited by
          #4

          try clearing the datset on each click event before your databind call. like mydataset.clear() mydataadapter.fill(mydataset) mydatagrid.datasource = mydataset mydatagrid.databind() or you can create a temp table and use a command builder to run updates on that table. Regards, Johny Rodriguez The GDC, New York.

          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