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