Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Always append default extra sorting on hidden column in grid after user changes sorting

FeebsterMar 19 2022 — edited Mar 19 2022

Hi,
We are on APEX 20.1
I'm working on a page with a editable interactive grid region with 10+ columns and a couple of hidden columns. Action menu can't be accessed, but the end user can sort most of the visible columns. I like to group the data in the grid without actually applying Aggregate or Controle Break the grid layout. Therefore I like to always append "hidden" sorting on a hidden column at the end of each sorting after changes by the user in the grid. Makes sense?
So I'm trying to get my code the access something like getSorts and setSorts or even better through column options so I can influence the sorting of the grid.
Don't want to be too creative, but I already looked how to subscribe to the onChange of the sort-dialog model.

Anyways, looking at widget.interactiveGrid.js and some lines of code looks promising?
if ( lGridColumn.sort ) {
lModelColumn.sortIndex = lGridColumn.sort.order;
lModelColumn.sortDirection = lGridColumn.sort.direction;

So my question: is there a way to somehow influence the grid sorting using javascript/grid-model?

Comments
Post Details
Added on Mar 19 2022
0 comments
530 views