Hook RowDataBound event of gridview and then use following code
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
LinkButton DeleteButton = (LinkButton)e.Row.Cells[0].Controls[0];
if (null != DeleteButton)
{
DeleteButton.OnClientClick = "return(confirm('Are you sure you want to delete this record?'))";
}
}
0 comments:
Post a Comment