Mastering PowerBuilder

HomePrevious Lesson: Course 3:: Session 24 :: Page 290
Next Lesson: Course 3:: Session 24 :: Page 310
Sorting DataWindow in Windows 95 way

PFC supports windows 95 type sorting also. If you are a Windows 95 user, you might have observed in the Explorer, whenever you click on one of the column, say, "File Type" Windows 95 automatically sorts on that column without prompting you with any sort criteria dialog box.

You just need to call of_SetColumnHeader() function, That’s all.

dw_product.inv_sort.of_SetColumnHeader( TRUE )

When the user clicks on one of the DataWindow column header, PFC automatically sorts on that column in ascending order. If the user clicks on the same column again, PFC sorts the column in descending order. If the user selects sort option from the menu, PFC displays the appropriate dialog box depending the of_SetStyle() parameter you sent. You may not want to enable this type of service for FreeForm presentation style DataWindows.

HomePrevious Lesson: Course 3:: Session 24 :: Page 290
Next Lesson: Course 3:: Session 24 :: Page 310