Is it possible to make an editable gridview so that certain rows are
editable and other are not editable, dependent upon a value in one of
the rows columns?
I would suggest converting the command to a template so you can access
the link button. Then in your rowcreated event do something like
this.
protected void GridView1_RowCreated(object sender,
GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int id = (int) DataBinder.Eval(e.Row.DataItem, "id");
if (id > 1)
{
LinkButton lb = (LinkButton)
e.Row.FindControl("LinkButton1");
lb.Visible = false;
}
}
}
Peter Kellner
http://peterkellner.net