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;
}
}

posted @ 2019-01-07 22:02  王小鹏  阅读(100)  评论(0编辑  收藏  举报