如何使用 C# 或 Jquery 启用/禁用 OBOUT 网格添加、编辑、删除图像图标
我试过这段代码:
grdadmin.AllowAddingRecords = false;
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
GridDataControlFieldCell cell = e.Row.Cells[10] as GridDataControlFieldCell;
Control linksContainer = cell.Controls[0].Controls[0];
bool disableEdit = false;
bool disableDelete = false;
disableEdit = true;
disableDelete = true;
linksContainer.Controls[0].Visible = !disableEdit;
linksContainer.Controls[2].Visible = !disableDelete;
linksContainer.Controls[1].Visible = !disableEdit && !disableDelete;
}
但我无法禁用图标