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

Advanced PowerBuilder

HomePrevious Lesson: Other Non-Mapped, but Important DataWindow Events
Next Lesson: Data Retrieval Cancellation

Removing Unwanted Rows

For any reason if you want to get rid of some rows in a DataWindow (but not from the database), what you do?

You might have thought of calling DeleteRow() function. Well, you can do that, however, the DeleteRow() function moves those rows into Delete buffer, meaning, they will also get deleted from the database when you call Update() next time on that DataWindow.

The other option is to create a DataStore and assign the same DataWindow object and use RowsMove() function to move rows from the DataWindow to the DataStore. In case if the user wants to restore it back, you don't have to retrieve them from the database all over again; you can move them back to the DataWindow. Please note that, when you move rows using RowsMove() function, the row status in the target DataWindow is set to NewModified! And you may want write some code to store the row and column statuses.

If you do not want to restore functionality, you can just call RowsDiscard() function which removes these rows from the DataWindow, but do not populate Delete buffer.
HomePrevious Lesson: Other Non-Mapped, but Important DataWindow Events
Next Lesson: Data Retrieval Cancellation

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