Friday, October 7, 2016

Sorting by Grid Column Header Disables Sort() Function

If a Grid column header is selected any further actions with peoplecode using the Sort() function will be rendered useless.  This is assuming you have column sorting enabled.  Basically what happens is it marks the grid as being sorted.  I have not found a way to reset/change this value.  This can be checked with debugging using the IsUserSorted(GridName) function.   





One option is to disable the Allow Column Sorting option.  To access this pull up the page, right click on the Grid and select Page Field Properties.  In the Grid Properties pop up select the Use tab and uncheck the Allow Column Sorting check box.





The best development work around I could find without using brute force can be found at the link below.  If anyone has any other possible approaches feel free to mention them in the Comments section.

http://technoeureka.blogspot.com/2015/01/peoplesoft-isusersorted-example-with.html

3 comments:

  1. This is an old post, but I just found it researching the same issue. So, here's a way to let the user sort, but prevent the sticky personalization. A user still has to leave the component and come back, but it does work:

    Disable Grid Personalization:
    1. Open the Grid Properties dialog box
    2. Select the Label Tab
    3. Click the Personalize button for the header navibation (this opens the Header Navigation Bar Properties dialog box)
    4. Select the Personalize tab
    5. Select the Invisible checkbox
    6. lick the OK button.

    ReplyDelete
  2. #6 is CLICK. CLICK please. OMG.

    ReplyDelete
  3. Can we Enable/Disable grid column sorting using code?

    ReplyDelete