显示或隐藏一个Grid

The Rowset class contains two methods that can be used to show and hide all rows:

  • ShowAllRows()
  • HideAllRows()

You can use these two methods to show or hide a grid on a page associated wtih a particular rowset. Simply make sure that the grid uses the main record that your rowset refers to, then refer to this scroll record using a rowset and call the methods to show or hide the grid.

This is particularly useful if you have a field that determines whether or not a grid should be displayed. For example, a check box field calledSpecify individual users and a grid used to enter individual users. Make sure you put your PeopleCode in both the FieldChange andRowInit methods to ensure consistency when showing/hiding your grid.

Also make sure that in your page properties, you have the Adjust Layout for Hidden Fields check box set. This ensures the page height adjusts dynamically based on whether or not the grid is visible, rather than leaving a big whitespace gap when it is hidden.

Note if you are receiving errors about modifying the current program context, move your code up a scroll level and then use ShowAllRows()or HideAllRows() from the higher level scroll on your rowset. You cannot use this code at the same scroll level as the grid itself.

转载于:https://www.cnblogs.com/bryanchen/p/3385949.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值