Selecting templates at runtime
Two DataWindow properties, Export.XML.TemplateCount and
Export.XML.Template[ ].Name, enable you to provide a list of templates
from which the user of the application can select at runtime.
The TemplateCount property gets the number of templates
associated with a DataWindow object. You can use this number as the
upper limit in a FOR loop that populates a drop-down list with the
template names. The FOR loop uses the Template[ ].Name
property.
|
1 2 3 4 5 6 7 8 9 10 11 |
string ls_template_count, ls_template_name long i ls_template_count=dw_1.Describe ("DataWindow.Export.XML.TemplateCount") for i=1 to Long(ls_template_count) ls_template_name= dw_1.Object.DataWindow.Export.XML.Template[i].Name ddlb_1.AddItem(ls_template_name) next |
Before generating the XML, set the export template using the
text in the drop-down list box.
|
1 |
dw_1.Object.DataWindow.Export.XML.UseTemplate = ddlb_1.text |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest