10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Remove Fields DynamicallyAfter all columns have been added to the table field, create an array variablefor the table field using the DeclareData method.For a discussion of dynamically declaring the array variable for the table field,see How You Can Declare a Composite Field's Array Variable Dynamically (seepage 380).How You Can Remove Fields DynamicallyTo remove a field from the form while its frame is running, set the field'sparent to null. The technique used to set the parent depends on whether thefield was created originally with a variable declared or was created withoutdeclaring its variable.How You Can Remove a Field from DisplayTo remove a field that was created originally in OpenROAD Workbench with adeclared variable (the default behavior), you can use the field function toreference the field when setting its parent to null. The following statementremoves a field created in Workbench:field(myfield).ParentField = null;Fields that are created dynamically, however, cannot be referenced using thefield function. You must refer to these fields with the reference variable used tocreate them. Because the field function operates on a data variable to returnits reference variable, it is irrelevant to dynamically created fields. Fieldscreated dynamically do not have a data variable.The following statement removes a dynamically created table field named tfieldfrom display:tfield.ParentField = null;Because every field that is part of a composite field has a reference variablepointing to it in the composite's ChildFields array, you can remove all the fieldsin a composite by clearing that array. The following statement removes allfields in the mfield matrix field:mfield.ChildFields.Clear();378 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!