全部博文(105)
分类:
2010-08-20 11:22:21
Sort, Filter and Query Dialogs |
The datawindow is the work horse of PowerBuilder, when you have been using it for a while it is easy to forget some of the basic but very powerful built-in function of the Datawindow.
SortYou can specify the default sort sequence of the datawindow using a cool drag and drop style response window, but you may not know that with two or three simple commands you can offer the same dialog window to users of your application: String ls_Null SetNull( ls_Null ) dw_1.SetSort( ls_Null ) dw_1.Sort() FilterThe filter is a great function for showing users slices of the data making the screen less cluttered and making large amounts of data easier to deal with. Well the filter dialog window is also available to your users: String ls_Null SetNull( ls_Null ) dw_1.SetFilter( ls_Null ) dw_1.Filter() Query ModeQuery mode is a great feature for higher power users. It allows them to alter the where clause by entering arguments into the Datawindow columns. For example whilst in query mode the user could enter IF NOT this.checked THEN dw_1.Modify("DataWindow.QueryMode=YES") ELSE dw_1.Modify("DataWindow.QueryMode=NO") dw_1.Retrieve() END IF |