Hyderabad Jobs Book Website FREE PowerBuilder Training I Love Hyderabad Hyderabad Colleges
Home Business Emails Hyderabad Classifieds Contact Us
7 Wonders of Hyderabad Web Hosting Yellow Pages Our Network

 
Webpowerbuilder.hyderabad-colleges.com

Mastering PowerBuilder

HomePrevious Lesson: Editing Document In RTE Control
Next Lesson: DataWindow Dot Notation - Error Handling

Sharing DataWindow/DataStore With a RTE Control

You may recall that except for DataWindow and RTE controls all other window controls do not have data awareness. For example, you can't populate a ListBox or TreeView with data directly from the database unless you retrieve the data from the database separately and populate these controls in a loop. However in RTE, you can share DataWindow/DataStore fields with the RTE control input fields. The following code shares a DataStore with the RTE control by calling DataSource().
rte_1.DataSource( ids_DataStore )

Once you associate a DataWindow/DataStore with a RTE control, you can use the DataWindow/DataStore field names in the RTE control using InputFieldInsert(). As long as the field names in the DataWindow/DataStore and RTE control are same. the DataWindow/DataStore data is available in the RTE control.

When a RTE control is not associated with a DataWindow/DataStore, there will be only one instance of the document. However, when you associate a DataWindow/DataStore with the RTE control, PowerBuilder creates the document instances equal to the number of rows in the DataWindow/DataStore. The text you type or picture you insert in the document is repeated for each row in the DataWindow/DataStore. However, the content of the input fields in the RTE control reflects the values of DataWindow/DataStore.

All RTE document instances are exactly same except for the content of the input fields. It is similar to the mail merge you do in a word-processor. By default, PowerBuilder displays the content of the field in the RTE control however, you can choose to display the input field name instead of the input field value by setting InputFieldNamesVisible property to TRUE.
HomePrevious Lesson: Editing Document In RTE Control
Next Lesson: DataWindow Dot Notation - Error Handling

Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com