dgDataGridName.Style("Z-INDEX") = "2700"
The above code sets the ZIndex of the given control ... A control with a ZIndex of 5 will sit on top of a control with a ZIndex with 3 ... In other words, controls are placed on top of other controls with a ZIndex less than their own when the form is rendered.
I was thinking that when the edit link was clicked, the ZIndex of the grid may have been lowered below that of the panel..? 2700 is abnormally high so it should've been above anything else rendered on the form (ASP.net starts numbering controls at 100 ad goes up from there).
The only other advice I could offer would be to remove the grid from the panel add see if the same thing happens. It almost sounds like the grid is behind the panel...