Below needs to be defined in ExternalDataBound event
((System.Web.UI.WebControls.GridViewRow)parameter).Attributes["OnClick"] = ((CMS.Base.Web.UI.CMSGridActionButton)((System.Web.UI.WebControls.GridViewRow)parameter).FindControl("aselect")).OnClientClick;