G
Guest
I'm having some trouble with a listbox on a Windows form.
Initially it populates fine. I have another listbox (listbox1) and when it's
index changes, listbox2 is repopulated.
I have a textbox that displays what is selected in listbox2.
It is rare that listbox2 has any data right now.
So if I click through listbox1, and there is no data to put in listbox2,
it's fine.
When I click on the first item in listbox1 that does have data to display in
listbox2, it's fine.
Then, when I move to another item in listbox1, my listbox2 never changes.
Whatever was displayed in there the 1st time, remains.
The wierd thing is, the textbox, that is populated with the code:
dim drv as datarowview
drv = Me.listbox2.SelectedItem
Me.txtbox1.Text = drv("STR_AMEND_NO").ToString
this displays the correct data...
and if there are supposed to be greater than 1 items in listbox2, but only 1
is displaying (from a previous selection), i can still click on 1 or 2 items
in listbox2 (even though I can't see them) and the correct data displays in
txtbox1.
I'm not sure if I've given enough information to go on here...but I'm very
frustrated!!
TIA!
Amber
Initially it populates fine. I have another listbox (listbox1) and when it's
index changes, listbox2 is repopulated.
I have a textbox that displays what is selected in listbox2.
It is rare that listbox2 has any data right now.
So if I click through listbox1, and there is no data to put in listbox2,
it's fine.
When I click on the first item in listbox1 that does have data to display in
listbox2, it's fine.
Then, when I move to another item in listbox1, my listbox2 never changes.
Whatever was displayed in there the 1st time, remains.
The wierd thing is, the textbox, that is populated with the code:
dim drv as datarowview
drv = Me.listbox2.SelectedItem
Me.txtbox1.Text = drv("STR_AMEND_NO").ToString
this displays the correct data...
and if there are supposed to be greater than 1 items in listbox2, but only 1
is displaying (from a previous selection), i can still click on 1 or 2 items
in listbox2 (even though I can't see them) and the correct data displays in
txtbox1.
I'm not sure if I've given enough information to go on here...but I'm very
frustrated!!
TIA!
Amber