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. C#
  4. BindingSource: BEFORE CurrentChanged?

BindingSource: BEFORE CurrentChanged?

Scheduled Pinned Locked Moved C#
helpquestion
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
    moon44
    wrote on last edited by
    #1

    Hello, I create controls dynamical by the values of the rows in my BindingSource. I do this in the event CurrentChanged. I add a control to a panel and bind this control to the BindingSource. the problem is: the current changes BEFORE I add the fitting control. that means a wrong (old) control might still exist when the BindingSource changes to another row. so the content might not fit for this control. the "old" is cleared and the new (fitting) one is added afterwards. how could I clear the old control BEFORE the "current Changed"? thank you!

    V 1 Reply Last reply
    0
    • M moon44

      Hello, I create controls dynamical by the values of the rows in my BindingSource. I do this in the event CurrentChanged. I add a control to a panel and bind this control to the BindingSource. the problem is: the current changes BEFORE I add the fitting control. that means a wrong (old) control might still exist when the BindingSource changes to another row. so the content might not fit for this control. the "old" is cleared and the new (fitting) one is added afterwards. how could I clear the old control BEFORE the "current Changed"? thank you!

      V Offline
      V Offline
      VMSSanthosh
      wrote on last edited by
      #2

      instead of binding it in current change event... bind it item databound of that table VMSSanthosh

      M 1 Reply Last reply
      0
      • V VMSSanthosh

        instead of binding it in current change event... bind it item databound of that table VMSSanthosh

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

        Hello, thank you for your answer! The problem is, i dont find this event. I can imagine such a event in .net 1.1 webcontrol-datagrid. I am using .NET 2 on Winforms. can you specify your answer? thank you. thank you

        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