Skip to Main Content

Info

Read Only options for Interactive Grids (IG).

Dynamically setting Interactive Grids columns to Read Only (or Disabled) can cause some cell values to become null when submitting the IG.
In the examples below, I have tried to replicate this without actually saving the changed data - I would like my DEPT table to stay unchanged for other pages :-) Also I have used "1 = 1" as the "dynamic" part, but you get the idea.
I have added a Debug field to all the IGs, which are filled with the column values of all modified rows, during the Submit.
The DEPTNO and DNAME columns are all Read Only in the examples below, using various methods. The LOC column can be edited and "saved" by using the Submit button for that IG.

IG-1 and IG-2 are there for reference only. All columns are disabled by default so no Submit option there. The columns do look different from the other IGs however, which is a shame, but that can be fixed with some CSS if you like.
IG-3 and IG-4 work fine, but of course the columns are not dynamically set to Disabled or Read Only.
You can see the problem in IG-5 and IG-6. If you change the value of only 1 row, it works fine. But if you change the value of 2 or more rows, only the last row is OK - for the other rows, the Read Only columns have become null.
IG-7 fixes the problem by using some JavaScript. Too bad JavaScript is needed here, but what can you do...

Info & inspiration:

IG-1 - IG Edit Disabled

Attributes -> Edit -> Enabled = No

IG-2- Region Read-Only

Attributes -> Edit -> Enabled = Yes
Region -> Read Only -> Always

IG-3 - Display Only columns

Attributes -> Edit -> Enabled = Yes
Columns (DEPTNO/DNAME) -> Identification -> Type -> Display Only

IG-4 - Read Only columns

Attributes -> Edit -> Enabled = Yes
Columns (DEPTNO/DNAME) -> Read Only -> Always

IG-5 - DA "After Refresh (Region)" Disable columns

Attributes -> Edit -> Enabled = Yes
DA -> Event = After Refresh (Region) -> Action = Disable -> Column(s) = DEPTNO,DNAME

IG-6 - DA "Row Initialization (IG)" Disable columns

Attributes -> Edit -> Enabled = Yes
DA -> Event = Row Initialization (IG) -> Action = Disable -> Column(s) = DEPTNO,DNAME

IG-7 - DA "Row Initialization (IG)" JavaScript

Attributes -> Edit -> Enabled = Yes
DA -> Event = Row Initialization (IG) -> Action = JavaScript = ".addClass('apex_disabled')" + ".attr('tabindex','-1')"

Code

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name

Region

Identification
Sequence
Title
Type
Source
Source Type
Table Name

Button

Name
Button Name
Text Label / Alt
Displayed
Sequence
Display in Region

Button

Name
Button Name
Text Label / Alt
Displayed
Sequence
Display in Region

Button

Name
Button Name
Text Label / Alt
Displayed
Sequence
Display in Region

Button

Name
Button Name
Text Label / Alt
Displayed
Sequence
Display in Region

Button

Name
Button Name
Text Label / Alt
Displayed
Sequence
Display in Region

Button

Name
Button Name
Text Label / Alt
Displayed
Sequence
Display in Region

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Region
Server-Side Condition
Type
Expression 1
Expression 2
Advanced
Event Scope
True Action
Identification
Action
Execution Options
Sequence
Fire On Initialization
Affected Elements
Selection Type
Column(s)

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Region
Server-Side Condition
Type
Expression 1
Expression 2
Advanced
Event Scope
True Action
Identification
Action
Execution Options
Sequence
Fire On Initialization
Affected Elements
Selection Type
Column(s)

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Selection Type
Region
Server-Side Condition
Type
Expression 1
Expression 2
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization
Affected Elements
Selection Type
Column(s)

Process

Name
Button Name
Type
Process Point
Sequence
Process Point
Run Process
Source
Process

Process

Name
Button Name
Type
Process Point
Sequence
Process Point
Run Process
Source
Process
Conditions
When Button Pressed

Process

Name
Button Name
Type
Process Point
Sequence
Process Point
Run Process
Source
Process
Conditions
When Button Pressed

Process

Name
Button Name
Type
Process Point
Sequence
Process Point
Run Process
Source
Process
Conditions
When Button Pressed

Process

Name
Button Name
Type
Process Point
Sequence
Process Point
Run Process
Source
Process
Conditions
When Button Pressed

Process

Name
Button Name
Type
Process Point
Sequence
Process Point
Run Process
Source
Process
Conditions
When Button Pressed