My problem occurs when I use an ArrayList as a ListBox.DataSou rce. When the
ArrayList attached to the Listbox is not empty the Listbox behave normal
without problem, but if I remove all items from the ArrayList and re-attach
the ArrayList to the ListBox the program hangs for about 3-5 seconds then
keep running normal.
I'm following the examples from the MSDN and dont see anything abnormal.
This is a sample of the code I'm using:
1 IList codesA = (IList)lstOfGro upAccessCodes.D ataSource;
2 IList codesB = (IList)lstOfCod esNotInGroup.Da taSource;
3 Object selectedItem = lstOfGroupAcces sCodes.Selected Item;
4 codesA.Remove(s electedItem);
5 lstOfGroupAcces sCodes.DataSour ce = null;
6 lstOfGroupAcces sCodes.DataSour ce = codesA;
7 lstOfCodesNotIn Group.DataSourc e = null;
8 codesB.Add(sele ctedItem);
9 lstOfCodesNotIn Group.DataSourc e = codesB;
The program hangs on line 6 for about 3-5 seconds when I remove the last
item of the ArrayList ( codesA.Count == 0 )
--
Jesse Martinez
Systems Developer
Multisystems, Inc
Capital Center South Tower 801
San Juan, PR, 00918
1-787-751-2720 x.231
This message may contain proprietary information intended only for it's
recipient. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, or distribution of the contents of this e-mail
is strictly prohibited. If you have received this e-mail transmission in
error, please reply to the sender, so that Multisystems can arrange for
proper delivery, and then please delete the message from your inbox. Thank
you.
ArrayList attached to the Listbox is not empty the Listbox behave normal
without problem, but if I remove all items from the ArrayList and re-attach
the ArrayList to the ListBox the program hangs for about 3-5 seconds then
keep running normal.
I'm following the examples from the MSDN and dont see anything abnormal.
This is a sample of the code I'm using:
1 IList codesA = (IList)lstOfGro upAccessCodes.D ataSource;
2 IList codesB = (IList)lstOfCod esNotInGroup.Da taSource;
3 Object selectedItem = lstOfGroupAcces sCodes.Selected Item;
4 codesA.Remove(s electedItem);
5 lstOfGroupAcces sCodes.DataSour ce = null;
6 lstOfGroupAcces sCodes.DataSour ce = codesA;
7 lstOfCodesNotIn Group.DataSourc e = null;
8 codesB.Add(sele ctedItem);
9 lstOfCodesNotIn Group.DataSourc e = codesB;
The program hangs on line 6 for about 3-5 seconds when I remove the last
item of the ArrayList ( codesA.Count == 0 )
--
Jesse Martinez
Systems Developer
Multisystems, Inc
Capital Center South Tower 801
San Juan, PR, 00918
1-787-751-2720 x.231
This message may contain proprietary information intended only for it's
recipient. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, or distribution of the contents of this e-mail
is strictly prohibited. If you have received this e-mail transmission in
error, please reply to the sender, so that Multisystems can arrange for
proper delivery, and then please delete the message from your inbox. Thank
you.