>>Ok here is what I see when I run my code.
>>
>>During the first run, my messagebox displays an empty string regardless of what I select in the contextmenu.
>>And if I select another student name from the contextmenu, the messagebox displays the studid of the previously selected student.
>>
>>I just can't understand why this behavior isn't manifested in your system. I have VS.net 2003 on my system.
>>
>>What I'm suspecting here is that somehow, for reasons I don't understand, is that my event handler executed after the [MsgBox(mystud.studid)] line in my main form. If this is the case, is there any solution?
>>
>>Thanks...
>
>To pose a solution I need the problem first. What I see is context menu is shown and correct id (at first and subsequent selections) is shown after "delay" message.
>You could put a MessageBox in handler to see order of execution. Have you tried to replace MsgBox() with MessageBox.Show()? I don't know if that would make a difference.
>Cetin
I stand corrected. You were right. I failed to notice "if uncommented" in your message. I thought it wasn't working when "delay" is there. OK then try changing handler to 'Select' instead of 'Click' (I don't know why. Looks like a bug to me).
Cetin