попробуйте что-то вроде этого:
<script language="javascript" type="text/javascript">
function rowno(rowindex) {
var gridViewCtlId = document.getElementById("<%=GridView2.ClientID %>").rows[rowindex].cells[1].innerText;
alert('you clicked on ' + gridViewCtlId);
}
</script>
<asp:GridView ID="GridView2" runat="server" OnRowDataBound="GridView1_RowDataBound1" PageSize="5">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<%--<asp:Button ID="Button1" runat="server" Text="Button" />--%>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
в .cs
protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox delete = (CheckBox)e.Row.Cells[0].Controls[1];
delete.Attributes.Add("onclick", "javascript:rowno(" + count + ")");
count++;
}
}