Sidney,
This is not so much asked as in past. The selected index fires as soon as
you set the datasource to the listbox.
There are two solution:
Set a switch in your selectex index change event that you set to true as
every thing is initial set in your listbox
Add the handler as soon as everything set in the listbox.
The last (in my opinion the nicest) you can see how in the bottom of the
form load in this sample.
http://www.vb-tips.com/default.aspx?...8-a5006c96efe4
Don't than forget the addhandler at the end of the event sub.
I hope this helps.
Cor
"Sidney" <Si*******@hotmail.com> schreef in bericht
news:uI**************@TK2MSFTNGP12.phx.gbl...
I tried to databind the listbox in vb.net with dataset
I wrote some code in the listbox selectedindexchanged event, however,
whenever the programme goes to the selectedindexchanged, it hanged and I
need to closed the whole system
it appear this problem also when i click a check box which the the
CheckedChanged event in the check box
need refreshing the dataset with another SQL code
Thanks a lot~
Sidney