protected void CheckPowerFailWithLinkButtonField(FineUIPro.Grid grid, string columnID) { FineUIPro.LinkButtonField btn = grid.FindColumn(columnID) as FineUIPro.LinkButtonField; btn.Enabled = false; btn.Hidden = true; btn.ToolTip = CHECK_POWER_FAIL_ACTION_MESSAGE; }
protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e) { User user = e.DataItem as User; // 不能删除超级管理员 if (user.Name == "admin") { FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField; deleteField.Enabled = false; deleteField.ToolTip = "不能删除超级管理员!"; } }
// 超级管理员(admin)不可编辑,也不会检索出来 protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e) { Infobasis.Data.DataEntity.User user = e.DataItem as Infobasis.Data.DataEntity.User; FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField; // 不能删除超级管理员 if (user.IsClientAdmin) { deleteField.Enabled = false; deleteField.ToolTip = "不能删除管理员!"; } else { deleteField.Enabled = true; deleteField.ToolTip = "删除"; } }
// 超级管理员(admin)不可编辑,也不会检索出来 protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e) { Infobasis.Data.DataEntity.Company company = e.DataItem as Infobasis.Data.DataEntity.Company; FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField; // 不能删除超级管理员 if (company.IsSystemAdminCompany.HasValue && company.IsSystemAdminCompany.Value) { deleteField.Enabled = false; deleteField.ToolTip = "不能删除此数据!"; } else { deleteField.Enabled = true; deleteField.ToolTip = "删除"; } }
// 超级管理员(admin)不可编辑,也不会检索出来 protected void Grid1_PreRowDataBound(object sender, FineUIPro.GridPreRowEventArgs e) { Infobasis.Data.DataEntity.BudgetTemplateData data = e.DataItem as Infobasis.Data.DataEntity.BudgetTemplateData; FineUIPro.LinkButtonField deleteField = Grid1.FindColumn("deleteField") as FineUIPro.LinkButtonField; }