Page 1 of 1

Pass contents of checked list box to parent form

Posted: Sun Feb 26, 2012 11:48 pm
by gaiid_it
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

Pass contents of checked list box to parent form

Posted: Mon Feb 27, 2012 4:35 am
by davidc
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