Properties have been added to standard PowerBuilder controls to enhance the application presentation in the .NET environment and to improve application performance. These properties are listed in “Global Web configuration properties”. You can set them on the Configuration tab in the .NET Web Forms project painter.
The global properties are generated in the Web.config file in the main folder for your PowerBuilder .NET Web Forms project under the IIS server root. After deployment, you can edit the file directly, or you can modify the global properties using the IIS Manager.
For information on how to modify global properties in the IIS Manager, see “Viewing and modifying global properties in IIS Manager”.
Global properties also allow you to share data across application sessions. For information on sharing DataWindows, see “Sharing data across sessions”.
DataWindow pagination If the HTMLGen.PageSize property (RowsPerPage property in DataWindow .NET and Rows Per Page in the DataWindow painter) of a DataWindow object is not set, the Web.config file property PBDataWindowRowsPerPage limits the number of rows per page for a Web DataWindow control to 20 rows by default. Because this renders only the specified number of rows at a time, the PBDataWindowRowsPerPage helps reduce the size of the HTML response and thereby enhances performance. This property is global, since it applies to all DataWindows in the application for which HTMLGen.PageSize is not set.
Pagination and DataWindow presentation style The PBDataWindowRowsPerPage setting has no effect on the number of rows in a DataWindow object with the Label presentation style. Composite and Crosstab presentation styles do not support pagination.
To disable pagination of Web Forms DataWindow objects, set the PBDataWindowRowsPerPage property to -1. To disable pagination for a specific DataWindow object, set its HTMLGen.PageSize property to -1.
DataWindow page navigation There are several global properties related to DataWindow page navigation.You can set the navigation bar at the top or the bottom of a DataWindow page by modifying the PBDataWindowNavigationBarPosition property. You can edit labels for the “QuickGo” navigation bar and the text for the current and total page counts by modifying the PBDataWindowGoToDescription, PBDataWindowGoToButtonText, and PBDataWindowStatusInfoFormat properties.
The PBDataWindowPageNavigatorType property lets you select the type of navigation bar you want to use: NextPrev, Numeric, QuickGo, or combined types. Figure 14-1 shows the default “NextPrev” navigation bar. It also displays page status information with the default text for the current and total page count. You can set the text in the PBDataWindowStatusInfoFormat property.
Figure 14-1: “NextPrev” navigation bar with page count display
The NextPrev navigation bar includes the “>” symbol for navigating to the next page, and the “<” symbol for navigating to the previous page. Doubled symbols are controls for navigating to the first page (“<<”) or last page (“>>”). The navigation bar folds up to display only symbols that are functional when a user displays the first or last page of a DataWindow. For example, the user cannot navigate to a previous page from the first page, and navigating to the first page is unnecessary, so the “<” and “<<” symbols do not display on the first page.
Figure 14-2 displays the “NumericWithQuickGo” navigation bar. The numeric portion of the navigation bar lists each page by its page number. You can set the PBDataWindowPageNavigatorType to “Numeric” or to “QuickGo” if you want to use these styles separately. You can also combine the NextPrev style with the QuickGo style by setting the PBDataWindowPageNavigatorType property to “NextPrevWithQuickGo”.
Figure 14-2: “NumericWithQuickGo” navigation bar and page count
Although the QuickGo navigation control defaults to a drop-down list, you can change this to a text box with an associated command button by setting the PBDataWindowQuickGoPageNavigatorType property to “Button”. You can edit the button label by setting the PBDataWindowGoToButtonText property. You set the label for the text box or the drop-down list by modifying the PBDataWindowGoToDescription property.