Export.XHTML.TemplateCount DataWindow object property
Description
The number of XHTML export templates associated with a DataWindow object.
Controls
DataWindow objects
Syntax
PowerBuilder dot notation:
|
1 |
<span>dw_control</span>.Object.DataWindow.Export.XHTML.TemplateCount |
Describe argument:
|
1 |
"DataWindow.Export.XHTML.TemplateCount" |
Usage
This property is used to get a count of the XHTML export templates
associated with a DataWindow object. It returns a long specifying
the number of XHTML export templates previously saved in the DataWindow
painter for the specified DataWindow object. The count is used with
the DataWindow.Export.XHTML.Template[ ].Name property
to enable an application to select an export template at runtime.
Examples
This code in the open event of a window uses the
TemplateCount property to get the number of templates associated
with dw1. It then uses the number returned as
the upper limit in a FOR loop that populates a drop-down list box with
the template names, using the DataWindow.Export.XHTML.Template[ ].Name property.
|
1 |
string ls_template_name<br>long l_template_count, i<br> <br>l_template_count = Long &<br>   (dw1.Object.DataWindow.Export.XHTML.TemplateCount)<br> <br>for i=1 to l_template_count)<br>  ls_template_name = &<br>  dw1.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 |
dw1.Object.DataWindow.Export.XHTML.UseTemplate=<br>  ddlb_1.text |