1. 程式人生 > >datagrid中設定編輯,刪除列是否可以訪問

datagrid中設定編輯,刪除列是否可以訪問

foreach (RepeaterItem Item in rpt_Result.Items)
{
LinkButton edit = (LinkButton)Item.FindControl("lbtnEdit");
LinkButton del = (LinkButton)Item.FindControl("lbtnDel");
if (ddlRelationH.Enabled == false)
{
edit.Enabled = false;
del.Enabled = false;
}
else
{
edit.Enabled = true;
del.Enabled = true;
}
}