Multi select in a powerbuilder data window
Question ID: 105986
0
0

I am trying to work with a power builder data window object. I have to select multiple items in the list. When I do a select method, each time I select an item it deselects the previous one. Is there a way to do a multiple selection? I don’t see a method to allow this in the PbDatawindow object help.

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on April 1, 2015 1:24 pm
244 views
Answers (1)
1
Private answer

Try giving this a shot -

To make this example simple, I am using a variable listTotal to control the loop of the total number of items in the list. Use this as a template and adjust according to your specific needs:

listTotal = 5

'Press down the Control key for multi-selection
PbWindow(''w_mainframe'').PbWindow(''w_vendors'').PbDataWindow(''dw_vendor_list'').Type micCtrlDwn

'Loop through list and select items by index number instead of string (while still holding down the control key)

For selectItem = 0 to listTotal
PbWindow(''w_mainframe'').PbWindow(''w_vendors'').PbDataWindow(''dw_vendor_list'').SelectCell ''#'' & selectItem, ''vendor_name''
Next

'Release the Control Key
PbWindow(''w_mainframe'').PbWindow(''w_vendors'').PbDataWindow(''dw_vendor_list'').Type micCtrlUp

'Close the list object
PbWindow(''w_mainframe'').PbWindow(''w_vendors'').PbDataWindow(''dw_vendor_list'').PbButton(''Close'').Click

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on April 1, 2015 1:27 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top