Below is the sample grid view for that...
Then add this simple code on the RowDataBound event of that Grid
protected void grdPatient_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton _singleClickButton = (LinkButton)e.Row.Cells[0].FindControl("lnkName");
string _jsSingle = ClientScript.GetPostBackClientHyperlink(_singleClickButton, "");
e.Row.Attributes["onclick"] = _jsSingle;
}
}
No comments:
Post a Comment