Page 1 of 1

Can I have sortable columns when I populate SFL myself?

Posted: Fri Jun 15, 2012 2:11 pm
by Thomas Garvey
I've got a subfile that is populated programmatically and the grid has the sortable columns property set, so the users can sort the columns as they wish. However, they also need to position the subfile starting at selectable values. That is, they click a button to bring up a window that allows entry of Position To values. Then the subfile is processed programmatically (by rrn) and when the first match is found, the SFLRCDNBR is set. However, the subfile as read programmatically is not the same sequence as displayed (it's in order originally populated).
So, am I correct that using sortable columns does NOT actually change the subfile records sequence? Thus, if I must have the Position To capability, I can't also use the sortable columns property?
How would you recommend I proceed?

Re: Can I have sortable columns when I populate SFL myself?

Posted: Tue Jul 24, 2012 7:46 pm
by Antonio
Hello,

By default, all column sorting happens on the client-side and your subfile records are not automatically updated when sorting occurs.

For what you are trying to accomplish, the only solution is to implement your own sorting in RPG. To specify server-side RPG sorting, you must use the "column sort response", "initial sort column", and "default sort order" properties.