ScoobyChris
Member
- Joined
- Sep 3, 2006
- Messages
- 6
- Programming Experience
- 1-3
Hi all,
I am using the following code to update two items of data in a dataset...
ds.Tables("addresses").Rows(ComboBox1.SelectedIndex).Item("Street") = txt_street.Text
ds.Tables("addresses").Rows(ComboBox1.SelectedIndex).Item("Town") = txt_town.Text
This seems to work fine however the problem I have is that in reading the(ComboBox1.SelectedIndex) value this also seem to generate a
ComboBox1_SelectedValueChanged event. Is this normal? I'm not actually changing the index value so why is the change event triggered?
This wouldn't be a problem however one of the things the change event sub does is txt_town.Text.Clear() and hence the above code just gives me a blank town field in the dataset!!
Thanks in advance for any comments.
I am using the following code to update two items of data in a dataset...
ds.Tables("addresses").Rows(ComboBox1.SelectedIndex).Item("Street") = txt_street.Text
ds.Tables("addresses").Rows(ComboBox1.SelectedIndex).Item("Town") = txt_town.Text
This seems to work fine however the problem I have is that in reading the(ComboBox1.SelectedIndex) value this also seem to generate a
ComboBox1_SelectedValueChanged event. Is this normal? I'm not actually changing the index value so why is the change event triggered?
This wouldn't be a problem however one of the things the change event sub does is txt_town.Text.Clear() and hence the above code just gives me a blank town field in the dataset!!
Thanks in advance for any comments.