Pass contents of checked list box to parent form

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
gaiid_it
Posts: 7
Joined: Fri Feb 03, 2012 12:14 am

Pass contents of checked list box to parent form

Post by gaiid_it » Sun Feb 26, 2012 11:48 pm

Hi,My parent form opens a sub form that then displays all AD groups in a checked list box. Checked groups are shown in a listbox in the sub form and should then be passed back to the parent form and displayed in another listbox.I cannot pass the listbox contents back at all and if I try to pass the checked list box, it will only show the last checked option, not the collection.I am have tried using script:subform_control and subform_control as the suggestion list displays them.how do I get the complete collection of checked items in the sub form back to the parent form?Thanks

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Pass contents of checked list box to parent form

Post by davidc » Mon Feb 27, 2012 4:35 am

Support for the CheckBoxList will be added in the next service build. In the mean time you can add the following to the subforms's FormClosing event:

$form1_FormClosing=[System.Windows.Forms.FormClosingEventHandler]{

#Event Argument: $_ =
[System.Windows.Forms.FormClosingEventArgs]

$script:subform_checkedlistbox1 = $checkedlistbox1.CheckedItems

}

David

David
SAPIEN Technologies, Inc.