找回密码
 立即注册

QQ登录

只需一步,快速开始

luanshixiaoguai

注册会员

18

主题

63

帖子

175

积分

注册会员

积分
175

活字格认证

luanshixiaoguai
注册会员   /  发表于:2018-11-15 17:06  /   查看:3011  /  回复:3
  1. <wj-flex-grid-column [binding]="'shipmntActQty'" header="出荷数" [width]="100" *ngIf="arFixFlgDis">
  2.   <ng-template wjFlexGridCellTemplate [cellType]="'CellEdit'" let-cell="cell" >
  3.       <wj-input-number class="form-control"
  4.                       [style]="(cell.width)"
  5.                       [(value)]="cell.item.shipmntActQty"
  6.                       [max]="9999999999"
  7.                       tabIndex="-1"
  8.                       readonly>
  9.       </wj-input-number>
  10.   </ng-template>
  11. </wj-flex-grid-column>
  12. <wj-flex-grid-column [binding]="'shipmntActQty'" header="出荷数" [width]="90" [isReadOnly]="true" *ngIf="!arFixFlgDis">
  13.   <ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
  14.     <wj-input-number class="form-control"
  15.                       [style]="(cell.width)"
  16.                       [(value)]="cell.item.shipmntActQty"
  17.                       [max]="9999999999"
  18.                       [isRequired]="false" [format]="'n0'"
  19.                       (lostFocus)="emesdfs104011012(cell.row.index);">
  20.     </wj-input-number>
  21.   </ng-template>
  22. </wj-flex-grid-column>
复制代码
我现在FlexGrid里边有两列都是【出荷数】,我想通过itemSource里边的一个boolean值【arFixFlgDis】去判断要表示哪一列。这么实现有什么问题么,现在画面上只会显示arFixFlgDis=true的那一列。

3 个回复

倒序浏览
JeffryLI
葡萄城公司职员   /  发表于:2018-11-16 16:09:35
沙发
itemsource 里面是值的集合,没有单独之可以判断,我的建议 判断放到外面取数据的之后,最好不要再数据源内部在做动作。后去取数据也很麻烦。
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
luanshixiaoguai
注册会员   /  发表于:2018-11-16 17:48:04
板凳
JeffryLI 发表于 2018-11-16 16:09
itemsource 里面是值的集合,没有单独之可以判断,我的建议 判断放到外面取数据的之后,最好不要再数据源内 ...

那就是说没法去隐藏某一列了是吧。
回复 使用道具 举报
JeffryLI
葡萄城公司职员   /  发表于:2018-11-16 17:50:42
地板
如果单是为了隐藏某一列,我们的column上就有一个visble属性可以设置隐藏某一列。
请点击评分,对我5分评价,谢谢!

葡萄城控件服务团队
官方网站: https://www.grapecity.com.cn/developer
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部