I am using Asp.Net Dynamic Data. I want to remove delete button from List and details page. I dont want to remove it from mark up. Is there any way to remove delete button based on entity and without adding custom pages?
+1
A:
Hi I was able to do it with this code.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton delete = (LinkButton) e.Row.FindControl("DeleteLinkButton");
delete.Visible = false;
}
}
You might want to format your code a little better
Kane
2009-07-22 10:51:41
hey kane sorry for that format. I have again tried it but the editor is not giving output as i want. :(
2009-07-24 12:21:50