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!

Interactive Grid - highlighting cells in APEX 18, 19 and 20

ostrowskibartoszMar 25 2020 — edited Mar 26 2020

I've got problem with Interactive Grid JavaScript API cross APEX versions.

First of all I've started with this old thread:

from which I've learned how I can use model field meta data to add custom classes to IG cell.

To make it simple let's say I have dynamic action bound to custom event addValidClass with true action Execute JavaScript Code defined as below:

var

  region = $(this.browserEvent.target),

  grid = region.interactiveGrid('getViews').grid,

  meta = grid.model.getRecordMetadata( this.data.recordId );

if ( !meta.fields.hasOwnProperty( this.data.column ) ) {

  meta.fields[ this.data.column ] = {};

}

meta.fields[ this.data.column ].highlight = "validValue";

grid.view$.grid("refresh");

I'm triggering this dynamic action using the code:

apex.event.trigger( $('#grid_ig').get(0), 'addValidClass', {recordId: 7839, column: 'ENAME'} )

My problem is that this code works as expected in APEX 19 and 20 but in APEX 18.1.0.00.45 it doesn't.

My observations:

  • when cell value is not changed I can change the cell class as many times I want - works every time
  • when cell value is modified the rendered grid table doesn't add given class
    • when checking model meta data for this row and column I can see the property highlight is set
  • when I save the grid using SAVE button then grid renders cells with classes I've assigned

Is it bug? Is there workaround I can use for APEX 18?

Regards

Bartosz

This post has been answered by John Snyders-Oracle on Mar 26 2020
Jump to Answer
Comments
Post Details
Added on Mar 25 2020
2 comments
2,101 views