[RESOLVED] Binding a textbox to an array
I would appreciate any help with the following.....
Code:
'Initialize an array
Dim myArray() As String = {"One", "Two", "Three"}
'as expected the text property of Textbox1 displays "One"
TextBox1.DataBindings.Add("Text", myArray(0), "")
' subsequently myArray is modified but Textbox1 still displays "One"
myArray(0) = "Four"
How do I get Textbox1.text to display the new value in myArray(0)?
Thanks
Re: Binding a textbox to an array
You would either have to call the ReadValue method of your Binding or else use a BindingList in the first place instead of an array, in which case you can call ResetItem or ResetBindings.
Re: Binding a textbox to an array
Thanks very much.
BindingList works perfectly.