Making Interactive Grid Rows Editable on Condition in Oracle Apex

In Oracle Apex, you can make interactive grid rows editable on condition. For example, you have a flag column APPROVED in your table, and if the APPROVED column value is N; a row can be edited else not. To do this, follow these steps:

Making Interactive Grid Rows Editable Conditionally in Oracle Apex

Create one more column in your interactive grid and set the following properties:

  • Column Name: EDITABLE
  • Type: Hidden
  • Value Protected: No
  • Source: SQL Expression
  • SQL Expression: decode(approved, 'N', 'U', 'X')
  • Data Type: Varchar2

If your interactive grid is based on a query, then you can add the column as follows:

Select empno, ename, sal, 
       decode(approved, 'N', 'U', 'X') EDITABLE
From emp;

Make the EDITABLE column as a hidden column.

After creating the column, click on the Attributes node of the interactive grid and specify the EDITABLE column for the Allowed Row Operations Column property. Below is the screenshot:

Oracle Apex: Allowed row operations column property.

Save the changes and run the page. Now only the rows will be editable, which are not approved.

Output:

Oracle Apex IG: Rows editable conditionally.

Related Tutorials:

Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 20 years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.

3 Comments

    • Have the same question! Is there a way we can make only certain rows editable on condition, and other columns editable for all rows?

    • you can add all required conditions to the separate column using case statement and then apply the rule as given above. Apart from this few columns which are required to make non editable, you can select an option 'Read Only' as Always.

Comments are closed.