KendoGrid MVC - 使用父 data.columnX 值隐藏详细信息网格中的列

KendoGrid MVC - Hide column in the Detail grid with parent data.columnX value

我在详细信息或分层 kendogrid 中有此列,并希望根据来自父级的 data.columnX 值隐藏该列。

    .Columns(columns =>
      {  
       columns.Bound(v => v.UpdateBy).Title("Edited By").Width("10%").Hidden("#= Data.OperationType # == 4 ? true : false");
      }

or even this is also not working

    .Columns(columns =>
      {  
       columns.Bound(v => v.UpdateBy).Title("Edited By").Width("10%").Hidden("#=Data.HideUserCol#");
      }

但这对我不起作用,我想我在语法上犯了一个小错误。

Hidden 可能是 falsetrue 如果我没记错的话。

无法在服务器上配置您要实现的目标(通过 MVC 包装器)。

您需要使用detailInit event that is triggered and hide the column manually with the hideColumn方法。