if (guid == null && Details != 1)
{
List<RecordTableTJGTModel> tjgtModelList= gtServer.getRecordTableTJGTDataByProjectId((decimal)projectId)
.GroupBy(i => i.ProjectCode)
.Select(i => i.OrderByDescending(a => a.HappenTime)
.FirstOrDefault())
.ToList();
if (!gvListManage.IsEditing && e.RowType == GridViewRowType.Data)
{
int index = e.VisibleIndex;
string dcaResult = gvListManage.GetRowValues(index, "RecordTableId").ToString();
foreach (Control c in e.Row.Cells[8].Controls)
{
foreach (RecordTableTJGTModel tjgtModel in tjgtModelList)
{
c.Visible = false;
if (dcaResult == tjgtModel.RecordTableId.ToString())
{
c.Visible = true;
break;
}
}
}
foreach (Control c in e.Row.Cells[9].Controls)
{
foreach (RecordTableTJGTModel tjgtModel in tjgtModelList)
{
c.Visible = false;
if (dcaResult == tjgtModel.RecordTableId.ToString())
{
c.Visible = true;
break;
}
}
}
}
}
}
asp.net中ASPxGridView根据ID隐藏删除和编辑按钮
最新推荐文章于 2020-06-22 08:16:17 发布