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. data unbinding relate...urgnt plzz

data unbinding relate...urgnt plzz

Scheduled Pinned Locked Moved C#
databasewpfwcf
2 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.
  • R Offline
    R Offline
    r_e_h_a_n
    wrote on last edited by
    #1

    hi, i make a search button and bind data with textboxes, everything is fine, now i make a clear button which will remove textboxes data after when i finished search into the database using search button i use "Clear()" method for all text boxes but now when i press clear button it clears all data in the textboxes but PostalCode and Year is not unbinding the database(not refreshing/clearing). how i can prevent it. remember i'm using two different buttons. and i know the textbox1.DataBindings.Remove()method so plz give me another choice to remove binding from these two fields. thx m.reehanmunir

    E 1 Reply Last reply
    0
    • R r_e_h_a_n

      hi, i make a search button and bind data with textboxes, everything is fine, now i make a clear button which will remove textboxes data after when i finished search into the database using search button i use "Clear()" method for all text boxes but now when i press clear button it clears all data in the textboxes but PostalCode and Year is not unbinding the database(not refreshing/clearing). how i can prevent it. remember i'm using two different buttons. and i know the textbox1.DataBindings.Remove()method so plz give me another choice to remove binding from these two fields. thx m.reehanmunir

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      To remove all databindings from a control you can simply call control.DataBindings.Clear(). You might need to set the Textbox's Text to String.Empty to clear it though. "Democracy is two wolves and a sheep voting on what to have for dinner" - Ross Edbert Sydney, Australia

      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