简体   繁体   中英

How to count number of checkboxes selected in powerbuider?

Can somebody tell me, please, how can I get the number of the selected checkboxes from a datawindow in powerbuilder?

Thanks!

Other possibility, without programming:

  1. Define the values for on and off at 1 and 0, respectively
  2. Add a computed field of arbirary name with as formula: sum(checkbox_name for all) (it can be visible or not)

Done.

You can access the value of this sum by its name ( getitemnumber ).

Loop through the rows looking for the value you have designated as the 'Datavalue for On' for the field with the editstyle of checkbox.

在此处输入图片说明

使用for循环来计数您选择的那些复选框。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM