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. .NET (Core and Framework)
  4. DataSource and Listbox/ComboBox

DataSource and Listbox/ComboBox

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpc++dotnet
3 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.
  • M Offline
    M Offline
    Mumiozol
    wrote on last edited by
    #1

    I set DataSource for ListBox in my WindowForm by calling set_DataSource and everything is ok. Then I add some data to my data source table and want list box to refresh it's data but nothing works. When I call Hide, then Show methods of ListBox it works but that's very stupid method. I'm quite new to .NET Framework classes and used to do this in MFC. Mickey :)

    D 1 Reply Last reply
    0
    • M Mumiozol

      I set DataSource for ListBox in my WindowForm by calling set_DataSource and everything is ok. Then I add some data to my data source table and want list box to refresh it's data but nothing works. When I call Hide, then Show methods of ListBox it works but that's very stupid method. I'm quite new to .NET Framework classes and used to do this in MFC. Mickey :)

      D Offline
      D Offline
      Douglas Troy
      wrote on last edited by
      #2

      Have you tried: ControlName.Invalidate(); or ControlName.Refresh(); after you've added, changed your DataSource? not sure this would fix your issue, but it's thought. D.

      M 1 Reply Last reply
      0
      • D Douglas Troy

        Have you tried: ControlName.Invalidate(); or ControlName.Refresh(); after you've added, changed your DataSource? not sure this would fix your issue, but it's thought. D.

        M Offline
        M Offline
        Mumiozol
        wrote on last edited by
        #3

        I forgot to write it, but the point is invalidation doesn't work. That was my first idea, but even invalidating dialog doesn't work. I think it has something in common with the method of filling the list. Maybe DataSource method isn't designed for refreshing (would be stupid)? Mickey :)

        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