Without code I'm not sure your implementation, but here's what I'd do:
LinkButton
, like Button
has an OnClientClick
property that you can set to call client-side JavaScript before running the PostBack. But you don't have access to this when you are using a CommandField
.
First, convert your CommandField
(the one with the Select button) to a TemplateField
. You should then be given a LinkButton
or Button
, which you can then set the OnClientClick
property for.
I think this would be a lot simpler than doing registerscripts, etc.