This may sound a little weird, even a little embarrassing.
In a web form I have two list boxes that act as a grid to grid control. You select a couple of items from the left control push a button and they get moved to the second control. I said MOVED not copied. The way it's done I iterate through the items using foreach loop if the ITEM is selected then I take that Item and I ADD IT to the second listbox, then I remove it from the first simple ainât it?
Here is the problem, when I select the last Item and then I move it to the other list the first Item on the list gets moved not the one I selected. Visually the first item is not highlighted meaning it is not selected, but when I run through a debug session I see that itâs Selected attribute is set to true! There are other weird selection issues as well but I wonât get into much detail. The bottom line they all exhibit the same behavior.
I do have another control that has the very same logic that does not cause such a problem. Has anybody experience or even heard of something similar? Do I point finger at .NET or I am missing something in my code?