Selecting XHTML export templates at runtime
Two DataWindow properties, Export.XHTML.TemplateCount and Export.XHTML.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 |
string ls_template_count, ls_template_name<br>long i<br> <br>ls_template_count=dw_1.Describe<br>  ("DataWindow.Export.XHTML.TemplateCount")<br> <br>for i=1 to Long(ls_template_count)<br>  ls_template_name=<br>  dw_1.Object.DataWindow.Export.XHTML.Template[i].Name<br>  ddlb_1.AddItem(ls_template_name)<br>next |
Before generating the XHTML, set the export template using
the text in the drop–down list box:
1 |
dw_1.Object.DataWindow.Export.XHTML.UseTemplate=<br>   ddlb_1.text |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments